Migration from 7.14.2 to 8.5.0

Dear all,

I try to migrate a 7.14.2 installation on Ubuntu 22.04 to 8.5.0 on a test instance.

My migration path is according to what is described here:

2.1: ok
2.2: ok
2.3: set permissions to 777
2.4: ./bin/console suitecrm:app:setup-legacy-migration

  • changed site_url, no vhost
    2.5: ./bin/console suitecrm:app:upgrade -t SuiteCRM-8.5.0
  • ok
    2.6: ./bin/console suitecrm:app:upgrade-finalize
  • got error message
  • setting APP_ENV=dev in .env I got

############ERROR MESSAGE##################
Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#46
#message: “”"
Attempted to load class “DoctrineFixturesBundle” from namespace “Doctrine\Bundle\FixturesBundle”.\n
Did you forget a “use” statement for another namespace?
“”"
#code: 0
#file: “./core/backend/Kernel.php”
#line: 84
trace: {
./core/backend/Kernel.php:84 {
App\Kernel->registerBundles(): iterable^
› if ($envs[$this->environment] ?? $envs[‘all’] ?? false) {
› yield new $class();
› }
}
./vendor/symfony/http-kernel/Kernel.php:379 { …}
./vendor/symfony/http-kernel/Kernel.php:779 { …}
./vendor/symfony/http-kernel/Kernel.php:121 { …}
./vendor/symfony/framework-bundle/Console/Application.php:168 { …}
./vendor/symfony/framework-bundle/Console/Application.php:74 { …}
./vendor/symfony/console/Application.php:166 { …}
./bin/console:42 { …}
}
}
2024-01-23T23:46:51+01:00 [critical] Uncaught Error: Class “Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle” not found
2024-01-23T23:46:51+01:00 [info] Deprecated: Return type of Symfony\Component\HttpFoundation\HeaderBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
2024-01-23T23:46:51+01:00 [info] Deprecated: Return type of Symfony\Component\HttpFoundation\HeaderBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
############ERROR MESSAGE##################

My questions are as follows:

Essentially we use SuiteCRM “as is”, i.e., did only some small changes via admin interface.
Are Database changes which are done during migration fisnished up to the state I described above, i.e., is it possible to export the database content and use it in a fresh 8.5.0 installation?

If not, how to get rid of the error?

Thanks in advance for help.

Regards

When you did upgrade-finalize, what error messages did it give you?

The error message is posted above between

############ERROR MESSAGE##################

The first 4 lines are the normal message, the following lines are caused by

APP_ENV=dev in .env

instead of

APP_ENV=prod in .env

What’s the reason you’re setting it to “APP_ENV=dev” (developer mode)?

To see the error in more detail

dev mode requires an added directory dist and the files in it. It won’t work without them, it’s crashing because it’s missing that folder. If you just want it to work and see the error in more detail, set APP_ENV=qa

Did it, got a result, but not as expected …

For this I started from scratch again

  • make homedir /var/www/html/suite85 for suite85
  • extract SuiteCRM-8.5.0-7.14-migration.zip in this homedir
  • make dir legacy under public
  • copy old 7.14.2 installation into legacy
  • chown -R www-data /var/www/html/suite85
  • chgrp -R www-data /var/www/html/suite85
  • chmod -R 777 /var/www/html/suite85
  • started the migration beginning with 2.4 in this guide
  • SuiteCRM 7.12.x+ migration to SuiteCRM 8.x :: SuiteCRM Documentation

  • no change in .env was made

2.4
./bin/console suitecrm:app:setup-legacy-migration

SuiteCRM Setup SuiteCRM 7.12.x Migration

Running: check-legacy-config
step: check-legacy-config | status: done
Found legacy config. Proceeding with migration
Running: setup-env
step: setup-env | status: done
Created .env.local
Running: change-theme
step: change-theme | status: done
Set suite8 theme as default theme
Running: manual-config-check
Manually Check legacy config
Please check the following entries in your ‘public/legacy/config.php’ (or config_override.php):

  • site_url: Update this to the location of your post-migration SuiteCRM8 instance
    Once completed, press y and enter to continue.y
    step: manual-config-check | status: done
    Manual config check done
    Running: change-rewrite-base
    step: change-rewrite-base | status: done
    WARNING: No htaccess file. Skipping htaccess update
    Running: manual-rewrite-base-check
    Manually Check legacy htaccess
    Please check RewriteBase in ‘public/legacy/.htaccess’ and update manually
    Check SuiteCRM 8 Migration documentation for information on how to configure
  • Based on your site url ‘http://localhost/suite85’.
  • The RewriteBase should be something like ‘/suite85/legacy’.
    Once completed, press y and enter to continue.
    step: manual-rewrite-base-check | status: done
    Manual RewriteBase check done
    Running: install-portability
    step: install-portability | status: done
    Successfully installed the portability folder

2.5

./bin/console suitecrm:app:upgrade -t SuiteCRM-8.5.0
PHP Deprecated: Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/suite85/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 134
PHP Deprecated: Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/suite85/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 144
PHP Deprecated: Return type of Symfony\Component\HttpFoundation\Session\Session::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/suite85/vendor/symfony/http-foundation/Session/Session.php on line 131
PHP Deprecated: Return type of Symfony\Component\HttpFoundation\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/suite85/vendor/symfony/http-foundation/Session/Session.php on line 141
PHP Warning: Cannot declare class OneLogin_Saml2_Auth, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class OneLogin_Saml2_AuthnRequest, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class OneLogin_Saml2_Constants, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class OneLogin_Saml2_Error, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class OneLogin_Saml2_ValidationError, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class OneLogin_Saml2_IdPMetadataParser, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class OneLogin_Saml2_LogoutRequest, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class OneLogin_Saml2_LogoutResponse, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class OneLogin_Saml2_Metadata, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class OneLogin_Saml2_Response, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class OneLogin_Saml2_Settings, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class OneLogin_Saml2_Utils, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 21
PHP Warning: Cannot declare class Zend\Oauth\Provider, because the name is already in use in /var/www/html/suite85/public/legacy/deprecated.php on line 67
PHP Warning: ini_set(): Session ini settings cannot be changed when a session is active in /var/www/html/suite85/public/legacy/include/entryPoint.php on line 169
PHP Warning: ini_set(): Session ini settings cannot be changed when a session is active in /var/www/html/suite85/public/legacy/include/entryPoint.php on line 170

SuiteCRM Upgrade

Running: backup-original-modules
step: backup-original-modules | status: done
Successfully backed up files
Running: check-package
step: check-package | status: done
Package found in path
Running: extract-package
step: extract-package | status: done
Package extracted
Running: check-permissions
step: check-permissions | status: done
Permissions checked
Running: install-upgrade-package
step: install-upgrade-package | status: done
Successfully installed package
Running: clear-symfony-cache
step: clear-symfony-cache | status: done
Successfully cleared cache
Warning! Please re-set permissions after this upgrade step has completed

2.6

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

SuiteCRM Finalize Upgrade

Running: legacy-post-upgrade
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: 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
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
Warning! Please re-set permissions after this upgrade step has completed

  • when I now call localhost/suite85 I simply get a directory listing - as before in my first attempt - there is no index.php or something like this

You’re not supposed to have a index.php there at the top level. It is inside public directory, which is what you tell your web server to serve (that is the “webroot”).

EDIT: About the missing files, there are instructions here about downloading the dev package:

When I set site_url during migration I set it to the directory of the top level - localhost/suite85, which points to /var/www/html/suite85

What I get now when I call

  • localhost/suite85/: directory listing
  • localhost/suite85/public:

Oops! An Error Occurred

The server returned a “500 Internal Server Error”.

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

You can edit that value of site_url in public/legacy/config.php

The entire 8.x app will break, until URL rewrites are configured correctly in your Apache Virtualhost. The app needs to communicate thru URLs to the graphQL API to do the most basic things:

And what if I have no virtual host, just a directory within apache?

Apache has a virtual host. At bare minimum, you’re using Apache’s “default host”. For 8.5 to work, you have to enable AllowOverrides in that directory, and set your DocumentRoot correctly to the right public folder. Details how to do this are in the “Webserver Setup Guide” above.

thanks - got it …

On my test server it works now, but not on that intented for production, although it is also ubuntu 22.04 and I used the same installation procedure …

As you can see from 2 screenshots tabular pages are ok, while those like Home or Calendar are not.

I nevertheless installed the same php mudules.

Where to look?


  1. Which username were you when you ran these upgrade commands?
  2. Which username is the Suite app running as?
  3. What’s the output of ls -la cache when run from the Suite base directory?
  1. root
  2. it runs under the plesk webserver user
  3. in the image you can see the ourput of ls -la cache from public/legacy

How about ls -la cache/themes from base directory of Suite 8 (not from public/legacy).

ls -la cache/themes from base gives:

no such file or directory.

there is only a directory prod under cache

Clear browser cache could fix this page CSS missing?
On Firefox, it’s: Tools, Settings, Privacy, Clear Data, only check Cached Web Content, Clear.
Or, Ctrl + Shift + R (force reload page).
Does this solve it?

No, same as before …