Merging done (and not done!) from 7.13.3 to 8.3.0

When I do migration from 7.13.3 to 8.3.0 with custom merge, strictly by the book, I get console messages saying that merging has been done.
But upgradeWizard.log says it was skipped, console:

root@webserver:/usr/local/www/apache24/data/crm8# sudo -u www ./bin/console suitecrm:app:upgrade-finalize -m merge
Cannot load Zend OPcache - it was already loaded
Please enter the version to move to: 8.3.0

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

Running: legacy-post-upgrade
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: Interlace handling should be turned on when using png_read_image
step: legacy-post-upgrade | status: done
Post Upgrade process complete
Running: add-new-config-entries
step: add-new-config-entries | status: done
Added new config entries to config file
Running: metadata-merge
**step: metadata-merge | status: done**
Metadata successfully merged
Running: run-migrations
step: run-migrations | status: done
No new migrations. Skipping
Running: finalize-clear-symfony-cache
step: finalize-clear-symfony-cache | status: done
Successfully cleared cache

and upgradeWizard.log:

Mon, 26 Jun 2023 20:31:12 +0100 [UpgradeWizard] - config.php file at () could not be found.  Skip merging.

Could anyone, please, tell me which one it is?
And why config.php was not found if it’s there with the right permissions?

Have a look at this function, it seems to be where the code fails:

Note that there are several places with similar messages to yours:

config.php file at () could not be found. Skip merging.

But that at () tells us that the error is somewhere before, it doesn’t find the file because it doesn’t have any path there… you’ll have to investigate why.

Thank you.

There’s no config_si.php file in the whole tree and that’s why, I think, the message is logged by the function right on the first statement.

But, to investigate why that file doesn’t exist, some time and knowledge, which I’m not sure to have, will be needed.

The function merge_config_si_settings is being called from:

./tmp/package/upgrade/legacy-migration/include/portability/System/Upgrade/PostUpgrade.php:559:        merge_config_si_settings(true, '', '', $path);

As the 3rd parameter is empty, the called function applies:

   } elseif (empty($config_location)) {
        global $argv;
        //We are assuming this is from the silentUpgrade scripts so argv[3] will point to SugarCRM install location
        if (isset($argv[3]) && is_dir($argv[3])) {
            $config_location = $argv[3] . DIRECTORY_SEPARATOR . 'config.php';
        }
    }

Which replaces $config_location with /, in which config.php does not exist. See ā€œargv[3] will point to SugarCRM install locationā€ above, which is /

What exists is /public/legacy/config.php that was never copied to /, as far as I’m aware.

I’m not a php expert, ā€˜C’ is my land, but I think this is correct.

Of course, / is the installation root which in my case is:

/usr/local/www/apache24/data/crm8

To prove this point I’ll repeat the installation copying config.php to the expected location; but not just now, I have to walk my dog :slight_smile:

Copied config.php, config_override.php and .htaccess to the root before starting executing the upgrade.

In fact, the log message about not finding config.php and skipping merge is gone, /public/legacy/config.php was touched but just the creation date, nothing else; but the files I had copied to the root were deleted.

But my main concern, which is preventing me to switch to v8 remains; that is the email import giving the message ā€œunknown error has occurredā€.

I keep saying this but I think this time I’m really going to wait for the next revision to give it another try.

1 Like