Migration 7.13.2 to 8.2.4 Failed "Unexpected error running Legacy Post Upgrade"

Hello,

Actually, i have installed suitecrm 7.13.2 in my environment. I followed the documentation about migration in 8.2.4.

When i use this command i get an error :

./bin/console suitecrm:app:upgrade-finalize
Please enter the version to move to: 8.2.4

SuiteCRM Finalize Upgrade 
============

Running: legacy-post-upgrade
step: legacy-post-upgrade | status: failed
Unexpected error running Legacy Post Upgrade

Thanks for your reply

Gary

Hi, welcome to the Community! :tada:

Is that really 7.4.2 you meant to write? That’s is very old. I am pretty sure you would have to run other partial upgrades before taking the jump to v8.

7.13.2 sorry i’m wrong, i modified.

Ok, that makes more sense.

I don’t know what to advise, except double-checking all the steps in the installation instructions - ownerships, permissions, web server configuration. There are also PHP modules and configuration that may need to be installed and enabled.

Oh, and check that you are inside the compatibility matrix, both for the original version and for the new one.

And check both your logs, if you can find errors there, you can focus your efforts.

In the logs i have this :

[2023-04-17 16:08:31] upgrade.INFO: step: legacy-post-upgrade | messages: [] []
[2023-04-17 16:08:31] upgrade.INFO: Unexpected error running Legacy Post Upgrade [] []

Where is the legacy-post-upgrade command file ? I think, i need to debug to find where is the error for me.

@pgr, i looking some log and configuration for SuiteCRM 8 i’m good, but i don’t know why, i don’t have any logs for this error.

Look for the logs in public/legacy directory.

The PHP log is important, if you check in your CLI phpinfo, you can find the location.

Run this from the command-line to determine the location of the relevant config file:

php -i | grep php.ini

Then go in that file and check your error_log and error_reporting settings.

Then re-run the upgrade script to get the errors.

With env=dev in .env i find the problem for this command.

Please enter the version to move to: 8.2.4

SuiteCRM Finalize Upgrade 
============

Running: legacy-post-upgrade
12:08:44 DEBUG     [php] Warning: Illegal string offset 'fields'
[
  "exception" => Symfony\Component\ErrorHandler\Exception\SilencedErrorContext^ {
    +count: 1
    -severity: E_WARNING
    trace: {
      ./public/legacy/custom/modules/Accounts/Ext/Vardefs/vardefs.ext.php:135 {
        require^
        ›  // created: 2023-03-08 11:17:12
        › $dictionary['CustomAccounts']['fields']['hq_country_code_c']['inline_edit']='1';
        › $dictionary['CustomAccounts']['fields']['hq_country_code_c']['labelValue']='HQ Country Code';
      }
      ./public/legacy/include/SugarObjects/VardefManager.php:272 { …}
    }
  }
]
step: legacy-post-upgrade | status: failed
Unexpected error running Legacy Post Upgrade
1 Like

@pgr have you an idea about this problem ?

The file /public/legacy/custom/modules/Accounts/Ext/Vardefs/vardefs.ext.php is causing an error during upgrade. I would simply remove it - or copy it somewhere else.

That file is a product of a Quick Repair and Rebuild, and it will be re-generated if necessary.

Ok i copy and remove it. I have a strange problem now with smarty cache. I remove it too but it’s not working.

Cache rebuild each time before i send a ./bin/console suitecrm:app:upgrade-finalize command and this file is regenerated : /public/legacy/custom/modules/Accounts/Ext/Vardefs/vardefs.ext.php.

An idea for fix this issue ?

Maybe it runs a QR&R automatically.

The origin for that file is probably somewhere under

custom/Extension/modules/Accounts

look for that and remove the origin.

@pgr
i am trying to upgrade the migration by following this steps from
SuiteCRM 7.12.x+ migration to SuiteCRM 8.x :: SuiteCRM Documentation
but when running migration ‘./bin/console suitecrm:app:setup-legacy-migration’ in cmd

and I tried this in vscode terminal


this is the result

please help to achieve migration

You’re trying to run Linux commands on Windows, that won’t work…

@pgr

is there any other command for doing migration in windows

I don’t think there’s any ready-made tutorial, no. But it should be straight-forward to discover, learn Windows command-line, how to change directories, how to run a script, etc.

It’s outside the scope of these forums, though. It’s more of a Windows question.