Mautic upgrade to 4.4.10 -> 5.0.1 breaks

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:

  1. Download Mautic 5.0.1
  2. Upload to server
  3. Unzip into public_html directory
  4. Ensure file/directory ownership is set appropriately
  5. 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:

  1. Drop all tables in database
  2. Import .sql file from 4.4.10 into database

… and here I get the first Mautic error:

… so I keep going:

  1. 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.

  1. php bin/console doctrine:migration:status

  1. php bin/console doctrine:migration:migrate


totermw_LYQnANe8TK

[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()  

Hi there,

Thanks for reporting the issue and sharing the detailed logs.

We have the point groups migration problem already reported and a fix proposed, which I found by searching for the error you have in the logs :slight_smile: .

Here’s the post:

Here is the fix for it which was shared late yesterday, hopefully it will be released imminently:

Please test it and report back if this resolved the issue on the GitHub pull request - I posted instructions here: Unable to pass DB migrations: Table 'point_groups' already exists · Issue #12993 · mautic/mautic · GitHub on how to leave a report.

Thank you! At least the issue I’ve uncovered is recent and active with the dev team! I will test and report back. We Americans are a bit behind you, so it’ll be tonight US time before I can test. Thanks again, and thanks for such an amazing project. I am honored to be a sponsor.

2 Likes

Much appreciated! We have a couple of other small things we’ve fixed since the release so I expect there will be a .2 release today or tomorrow depending on how fast they get reviewed/tested :slight_smile:

After upgrade from 4.4.10 → 5.0.1 I’m getting the same kind of red offline error message in the browser along with the ‘parameter x must be defined’ error(s) when running commands such as (doctrine:migrations:migrate) via CLI.
I am currently running 4.4.10 again (restored from backup).

Please make a new thread if your issue is different to this, otherwise it’s impossible for the team to track issues.

Please use the post template and provide your error logs from var/logs which helps to track down the issue (might want to search for the error first, in case it’s already addressed).

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.