Mautic Community Forums

After 3.2.1 to 3.2.5 upgrade, php bin/console throws error

Your software
My PHP version is : 7.3.20 as per Mautic system info, although on command line I can only seem to get to a PHP version 7.2.24
My MySQL version is 5.0.12

Updating/Installing Errors
I am : Updating from 3.2.1 to 3.2.5
Upgrading via Web

These errors are showing in the installer : none

These errors are showing in the Mautic log : Only some mail issues because I was hitting the send limit of my smtp relay. I’ve now switched to AWS SES, but the system keeps trying to send emails through the old servers. That’s in part why I was updating, as I saw that some mail related bugs had been fixed.

These errors are showing in the upgrade_log.txt file (located in the root of your Mautic instance when an upgrade has been attempted - ensure you remove or redact any sensitive data such as domain names in the file path) : There is no upgrade_log.txt file

Your problem
My problem is :
After running the upgrade from 3.2.1 to 3.2.5, Mautic says that I am running 3.2.5, but my command line tasks, including cron jobs, that use bin/console now throw the following error:


Type error: Too few arguments to function Mautic\LeadBundle\Model\ListModel
::__construct(), 3 passed in /var/www/html/var/cache/prod/Container1ptoicy/
appProdProjectContainer.php on line 9560 and exactly 4 expected


Steps I have tried to fix the problem :

  • clearing the cache

  • lots and lots of web searching, to no avail

  • looked at line 9560 in the file mentioned above, but can’t work out where the issue here might be

          'mautic\\apibundle\\provider\\nonceprovider' => 'Mautic\\ApiBundle\\Provider\\NonceProvider',

I deleted the files in that cache directory, and it appears to be working again.

I’ve now also run

$ php bin/console doctrine:migration:status
$ php bin/console doctrine:migration:migrate

and cleared the cache again. Running these a second time tells me that there are no more migrations to run.

Is there anything else that I might have to do?

Hi there, you should only need to do those steps if your upgrade failed for some reason. Did you try to upgrade in the UI and have it get stuck or something?

You should always follow these steps if you get stuck with an update:

1 Like

I didn’t think it had, but I’m wondering now whether it did get stuck in the cache clean and I didn’t notice. My problem was actually that the cache at /var/www/html/var/cache wasn’t cleaned out, and still causing a problem. I’m not sure what is using this second cache, rather than the one in the mautic directory tree, but deleting those files fixed the issue. Might be something to add to that advice document.

/var/cache is your Mautic cache.

Maybe you have an error in the file path in your Mautic config if the cache is some place other than the Mautic root?

There seemed to be a cache of something else in /var/www/html/var/cache/prod/ that caused the problem, separate from the mautic/var/cache directory.

All working fine now. Maybe just one of those tech gremlins that happen once every gazillion ticks :wink: