Your software
Mautic 4.4.10 upgrading to Mautic 5.0.1
PHP: tried both 8.0.30 and 8.1
Your Problem
Upgrading leads to error message
I used the command line upgrade path to upgrade from 4.4.10 → Mautic 5.0.1, but once the upgrade was complete, I receive ubiquitous error messages from any page.
So I blew away Mautic entirely and re-installed:
- Download Mautic 5.0.1
- Upload to server
- Unzip into public_html directory
- Ensure file/directory ownership is set appropriately
- Upload local.php file to config/ (from app/config/local.php in 4.4.10).
… and so far, there are no issues. I can still get into the instance without errors, even with the previous server’s config file. Here’s where the first error is thrown:
- Drop all tables in database
- Import .sql file from 4.4.10 into database
… and here I get the first Mautic error:
… so I keep going:
- clear cache (php bin/console cache:clear). This results in an [OK].
… but now the error message changes:
This happens to be the same error message I received when I used the command line upgrade from 4.4.10. But I keep going anyway.
- php bin/console doctrine:migration:status
- php bin/console doctrine:migration:migrate
[notice] Migrating up to Mautic\Migrations\Versionzz20230929183000
[notice] Table contact_export_scheduler already exists
[notice] Migration Mautic\Migrations\Version20220429091934 skipped during Pre-Checks. Reason: "Schema includes this migration"
[notice] Migration Mautic\Migrations\Version20221128145933 skipped during Pre-Checks. Reason: "Schema includes this migration"
[warning] Migration Mautic\Migrations\Version20230311195347 was executed but did not result in any SQL statements.
[notice] Table plugin_citrix_events already exists
[notice] Migration Mautic\Migrations\Version20230522141144 skipped during Pre-Checks. Reason: "Schema includes this migration"
[notice] Migration is not required.
[notice] Migration Mautic\Migrations\Version20230606111852 skipped during Pre-Checks. Reason: "Schema includes this migration"
[warning] Migration Mautic\Migrations\Version20230615101328 was executed but did not result in any SQL statements.
[notice] Table point_groups already exists
[notice] Table point_group_contact_score already exists
[error] Migration Mautic\Migrations\Version20230621074925 failed during Execution. Error: "An exception occurred while executing a query: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'point_groups' already exists"
In ExceptionConverter.php line 45:
An exception occurred while executing a query: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'point_groups' already exists
In Exception.php line 28:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'point_groups' already exists
In Connection.php line 70:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'point_groups' already exists
doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration CONFIGURATION] [--em EM] [--conn CONN] [--] [<version>]
… but here is where the troubleshooting documentation ends. Should I try the same command again ( doctrine:migrations:migrate ), the error changes.
[WARNING] Some commands could not be registered:
In AppKernelProdContainer.php line 11207:
The parameter "2F" must be defined.
In AppKernelProdContainer.php line 11207:
The parameter "2F" must be defined.
In AppKernelProdContainer.php line 11207:
The parameter "2F" must be defined.
Finally, in case this is helpful, here’s the final message I get:
mautic.ERROR: Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: The parameter "2F" must be defined. (uncaught exception) at /home/mautic/web/mautic.denverperfect10
console command `doctrine:migrations:migrate` [stack trace] #0 /PathToMautic/vendor/symfony/dependency-injection/EnvVarProcessor.php(283): ContainerQmO0wS2\AppKernelPr
ssor->Symfony\Component\DependencyInjection\{closure}() #2 /PathToMautic/vendor/symfony/dependency-injection/EnvVarProcessor.php(275): preg_replace_callback() #3 /home
397): Symfony\Component\DependencyInjection\EnvVarProcessor->getEnv() #4 /PathToMautic/app/bundles/CoreBundle/DependencyInjection/EnvProcessor/NullableProcessor.php(11
10.com/public_html/vendor/symfony/dependency-injection/Container.php(397): Mautic\CoreBundle\DependencyInjection\EnvProcessor\NullableProcessor->getEnv() #6 /home/mautic/web/mautic.denverperfect10.com/public_h
jection\Container->getEnv() #7 /PathToMautic/var/cache/prod/ContainerQmO0wS2/AppKernelProdContainer.php(11210): ContainerQmO0wS2\AppKernelProdContainer->getDynamicPara
ParametersHelper.php(42): ContainerQmO0wS2\AppKernelProdContainer->getParameter() #9 /PathToMautic/app/bundles/CoreBundle/Helper/CoreParametersHelper.php(79): Mautic\C
tml/app/bundles/CoreBundle/Helper/CoreParametersHelper.php(21): Mautic\CoreBundle\Helper\CoreParametersHelper->resolveParameters() #11 /PathToMautic/var/cache/prod/Con
truct() #12 /PathToMautic/var/cache/prod/ContainerQmO0wS2/getMigrationCommandSubscriberService.php(20): ContainerQmO0wS2\AppKernelProdContainer->getMautic_Database_Ver
tainerQmO0wS2/AppKernelProdContainer.php(2299): ContainerQmO0wS2\getMigrationCommandSubscriberService::do() #14 /PathToMautic/var/cache/prod/ContainerQmO0wS2/AppKernel
denverperfect10.com/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php(267): ContainerQmO0wS2\AppKernelProdContainer->ContainerQmO0wS2\{closure}() #16 /home/mautic/web/mautic.denverperfect10.com/p
r\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() #17 /PathToMautic/vendor/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDisp
endor/symfony/console/Application.php(1055): Symfony\Component\EventDispatcher\EventDispatcher->dispatch() #19 /PathToMautic/vendor/symfony/framework-bundle/Console/Ap
denverperfect10.com/public_html/vendor/symfony/console/Application.php(301): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() #21 /PathToMautic/vendo
) #22 /PathToMautic/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun()