Issues after upgrading from 7.14.4 to 8.6.1 - missing formatting in HTML

By “randomly” I meant that you are giving a command that changes thousands of files without first diagnosing whether there was actually a problem there, and in which file that problem was, and why.

The guide tells you to reset them initially, it doesn’t tell you that you need to keep doing it over and over. Degrading ownerships and permissions are always a sign of a badly configured server or badly executed maintenance. But it is not easy to get right, so it’s a very common problem.

About your logs, did you also check php_errors.log?

I enabled the php errors.log and no errors are being reported. I even created a test script with an error to make sure the reporting is working.

Any other ideas where to look for errors?

Sorry for the basic question, but I need to make sure - did you remember to run the upgrade-finalize step?

Other than that, if your installation is very broken, and you mention that you ran composer install, there’s a simple thing you can do to eliminate that as a potential cause of trouble. Download the full installer for your version, and use the vendor directory inside that zip.

So:

  • rename your current vendor directory to something like vendor.BAK
  • unzip the full installer
  • copy the vendor directory in its entirety to your installation

Also do these steps for public/legacy/vendor

Reset ownerships and permissions if you broke them by running these commands as the wrong user. And now try the system again, see if it works, or at least, if you now have errors in logs. Good luck

I ran it again just to make sure.

 sudo -u www-data ./bin/console suitecrm:app:upgrade-finalize -m override
Please enter the version to move to: SuiteCRM-8.6.1

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

Running: legacy-post-upgrade
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: iCCP: known incorrect sRGB profile
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: 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
step: legacy-post-upgrade | status: done
Post Upgrade process complete
Running: add-new-config-entries
step: add-new-config-entries | status: done
No new entries to add to the 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
Warning! Please re-set permissions after this upgrade step has completed

It made no difference.
Now I’ll try your other suggestions.

Okay so I copied both vendor directories to my installation. Now I’m unable to log-in. After entering the username and password, I get the SuiteCRM logo spinning in the middle of the page.

I do get some errors in the logs:

[2024-08-08 15:57:13] php.WARNING: Warning: include_once(/var/www/suitecrm8/vendor/doctrine/orm/src/Mapping/EntityListenerResolver.php): failed to open stream: No such file or directory {"exception":"[object] (ErrorException(code: 0): Warning: include_once(/var/www/suitecrm8/vendor/doctrine/orm/src/Mapping/EntityListenerResolver.php): failed to open stream: No such file or directory at /var/www/suitecrm8/cache/prod/ContainerOx7y1xL/App_KernelProdContainer.php:703)"} []
[2024-08-08 15:57:13] php.WARNING: Warning: include_once(): Failed opening '/var/www/suitecrm8/vendor/doctrine/orm/src/Mapping/EntityListenerResolver.php' for inclusion (include_path='/var/www/suitecrm8/public/legacy/include/..:.:/usr/share/php') {"exception":"[object] (ErrorException(code: 0): Warning: include_once(): Failed opening '/var/www/suitecrm8/vendor/doctrine/orm/src/Mapping/EntityListenerResolver.php' for inclusion (include_path='/var/www/suitecrm8/public/legacy/include/..:.:/usr/share/php') at /var/www/suitecrm8/cache/prod/ContainerOx7y1xL/App_KernelProdContainer.php:703)"} []
[2024-08-08 15:57:13] php.WARNING: Warning: include_once(/var/www/suitecrm8/vendor/doctrine/orm/src/Repository/RepositoryFactory.php): failed to open stream: No such file or directory {"exception":"[object] (ErrorException(code: 0): Warning: include_once(/var/www/suitecrm8/vendor/doctrine/orm/src/Repository/RepositoryFactory.php): failed to open stream: No such file or directory at /var/www/suitecrm8/cache/prod/ContainerOx7y1xL/App_KernelProdContainer.php:706)"} []
[2024-08-08 15:57:13] php.WARNING: Warning: include_once(): Failed opening '/var/www/suitecrm8/vendor/doctrine/orm/src/Repository/RepositoryFactory.php' for inclusion (include_path='/var/www/suitecrm8/public/legacy/include/..:.:/usr/share/php') {"exception":"[object] (ErrorException(code: 0): Warning: include_once(): Failed opening '/var/www/suitecrm8/vendor/doctrine/orm/src/Repository/RepositoryFactory.php' for inclusion (include_path='/var/www/suitecrm8/public/legacy/include/..:.:/usr/share/php') at /var/www/suitecrm8/cache/prod/ContainerOx7y1xL/App_KernelProdContainer.php:706)"} []
[2024-08-08 15:57:13] php.CRITICAL: Uncaught Error: Call to undefined method Doctrine\ORM\Configuration::setSchemaIgnoreClasses() {"exception":"[object] (Error(code: 0): Call to undefined method Doctrine\\ORM\\Configuration::setSchemaIgnoreClasses() at /var/www/suitecrm8/cache/prod/ContainerOx7y1xL/App_KernelProdContainer.php:728)"} []
[2024-08-08 15:57:13] request.CRITICAL: Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\UndefinedMethodError: "Attempted to call an undefined method named "setSchemaIgnoreClasses" of class "Doctrine\ORM\Configuration"." at /var/www/suitecrm8/cache/prod/ContainerOx7y1xL/App_KernelProdContainer.php line 728 {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\UndefinedMethodError(code: 0): Attempted to call an undefined method named \"setSchemaIgnoreClasses\" of class \"Doctrine\\ORM\\Configuration\". at /var/www/suitecrm8/cache/prod/ContainerOx7y1xL/App_KernelProdContainer.php:728)"} []
[2024-08-08 15:57:13] php.INFO: User Deprecated: Since api-platform/core 2.7: Use "ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface" instead of "ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface". {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since api-platform/core 2.7: Use \"ApiPlatform\\Metadata\\Resource\\Factory\\ResourceMetadataCollectionFactoryInterface\" instead of \"ApiPlatform\\Core\\Metadata\\Resource\\Factory\\ResourceMetadataFactoryInterface\". at /var/www/suitecrm8/vendor/api-platform/core/src/Action/ExceptionAction.php:58)"} []

To try and solve this issue, I ran:

composer install --no-dev

in the main directory and the public/legacy/

I can now log into the system but unfortunately I’ve still got the same issue of the pages not displaying properly.

Go to admin → Themes.

Otherwise, check if you have theme set in config_override.php

Otherwise, go to cache folder and delete theme folder and it will automatically get create on refresh.

Resolution

To overcome the symfony error you need to clear symfony cache by running next command on your SuiteCRM 8 instance root:

./bin/console cache:clear

I ran that but it did NOT solve the page not displaying properly

 sudo -u www-data ./bin/console cache:clear

 // Clearing the cache for the prod environment with debug false


 [OK] Cache for the "prod" environment (debug=false) was successfully cleared.


config_override.php looks like this:

<?php
/***CONFIGURATOR***/
$sugar_config['disable_persistent_connections'] = false;
$sugar_config['dbconfigoption']['collation'] = 'utf8_general_ci';
$sugar_config['default_currency_iso4217'] = 'ZAR';
$sugar_config['default_currency_name'] = 'Rand';
$sugar_config['default_currency_symbol'] = 'R';
$sugar_config['default_module_favicon'] = false;
$sugar_config['dashlet_auto_refresh_min'] = '30';
$sugar_config['stack_trace_errors'] = false;
/***CONFIGURATOR***/

I deleted the theme folder in the .../public/legacy/cache but still getting experiencing the same issue.

I just found another error in my log that I somehow missed: Guess I was only looking for PHP errors.

[2024-08-08 15:56:57] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: "Invalid CSRF token" at /var/www/suitecrm8/core/backend/Security/CSRFValidationListener.php line 95 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException(code: 0): Invalid CSRF token at /var/www/suitecrm8/core/backend/Security/CSRFValidationListener.php:95)"} []

I somehow feel this may be the cause of my issue. Any idea how to fix it?

There are topics on this error in this forum, you can search it.

Thanks - I did see those and have been testing most of them but I have not found a solution that works yet :frowning:

Here they’re saying to update composer but it is 7.11 version.

Should I run composer update in the SuiteCRM main directory, or the .../public/legacy or in both of them?

Sorry I don’t know.

Are you trying this on dev machine?

Unfortunately I did try the composer install --no-dev already - see here: Issues after upgrading from 7.14.4 to 8.6.1 - missing formatting in HTML - #23 by wavesailor

Right click on page and go to inspect. Go to console or network tab. Check what are errors you have there. Maybe it will help you to find solution.

Checked again but no errors - only a few warnings

It is difficult to find a problem. Maybe it will only work on PHP 8.1 or 8.2 :dizzy_face: