Mautic upgrade to 3.3.1 a mess again

Mautic 3.2.5
7.2
MariaDB

Upgrade button in admin has never worked anyway, so I followed the command line steps that worked on previous upgrades, using wget to get 3.3.1-update.zip, then applying with this:

php bin/console mautic:update:apply --update-package=3.3.1-update.zip

My installation is now all f***ed up again with the following errors showing up in SSH:

Failed to remove file “/home/myusername/public_html/mautic/var/cache/prod/ContainerBxexpyi/getMautic_Transport_Momentum_Service_SwiftMessageService.php”: unlink(/home/myusername/public_html/mautic/var/cache/prod/ContainerBxexpyi/getMautic_Transport_Momentum_Service_SwiftMessageService.php): Permission denied.

After that on any other php bin/console command I try, I get this error:

In ListModel.php line 78:

Type error: Argument 1 passed to Mautic\LeadBundle\Model\ListModel::__construct() must be an instance of Mautic\CategoryBundle\Model\CategoryModel, instance of Mautic\CoreBundle\Helper\CoreParametersHelper given, called in /home/myusername/public_html/mautic/var/cache/prod/ContainerBxexpyi/appProdProjectContainer.php on line 9592

What can I try next to fix this mess?

  1. Check permissions (who is running mautic)
    If you logged in as root, and ran the update command as root, you mess up the permissions. You’ll need to chown it to the proper user.
  2. Clear the cache

If you have any errors post it here

Thanks for the response. I was not logged in as root and have chowned the entire folder again after the fact to be sure. It did not clear up the error.

I can’t clear the cache. Any command I run now I get that same error message - ListModel.php line 78 etc. I am stuck. How can I get beyond this error?

What does the line 78 error mean?

Is there another (manual) way to clear the cache now SSH commands don’t work?

Hmm - no other way besides SSH.
Did you have any special plugin enabled prior to the 3.3.1 update?
What is the SMTP method you are using?
Joey

No plugins used whatsoever.

SMTP? Simple Mail Transfer Protocol? Where would that be involved? I don’t have any general connection issues with SSH.

There should be a way to fix the error manually; SSH is not magic. What does the error mean? Could I temporarily remove/disable a file/check to get passed it and clear the cache etc.?

I asked about SMTP, because sometime certain mail provider’s API is messed up, and you can turn it off to pass the checks.
Just an intuition, that you have to poke around there, but I might be wrong: “getMautic_Transport_Momentum_Service_SwiftMessageService.php”
So I can’t help.
J

I don’t use a mail provider and don’t see any connection with ListModel.php line 78:

Is there anyone involved with the inner workings of Mautic who can point me in the right direction, specifically what this error means and how to get beyond it?

Hi there - sounds frustrating!

As has already been said, you need to clear your cache.

If you were able to run the command

php bin/console mautic:update:apply --update-package=3.3.1-update.zip

you should be able to run the command

php bin/console cache:clear

If you cannot do that then delete the cache folder - Mautic recreates it on first load (assuming that your file and folders have the correct permissions - check this page for info).

Clearing the cache is a required step in every update.

1 Like

Thank you for your response.

I had cleared the cache before my upgrade attempt; that is when I got that first error, ‘Failed to remove file’.

I tried the upgrade nevertheless - my mistake, did not think that one file would be fatal. After that I get the ListModel.php line 78 error on any php bin/console command, so completely stuck.

I’ll try to manually delete the cache tonight, after my day job…

Yes - if you look at the error the file paths are pointing to things in the cache directory.

Failed to remove file “/home/myusername/public_html/mautic/var/cache/prod/ContainerBxexpyi/getMautic_Transport_Momentum_Service_SwiftMessageService.php”: unlink(/home/myusername/public_html/mautic/var/cache/prod/ContainerBxexpyi/getMautic_Transport_Momentum_Service_SwiftMessageService.php): Permission denied.

Type error: Argument 1 passed to Mautic\LeadBundle\Model\ListModel::__construct() must be an instance of Mautic\CategoryBundle\Model\CategoryModel, instance of Mautic\CoreBundle\Helper\CoreParametersHelper given, called in /home/myusername/public_html/mautic/var/cache/prod/ContainerBxexpyi/appProdProjectContainer.php on line 9592

So this suggests that there were insufficient permissions to complete the action, and hence the issues you are seeing I suspect!

Fingers crossed that will fix the issue!

1 Like

After manually clearing /mautic/var/cache/ the upgrade scripts went through.

2 Likes

Mautic was not working after clear cache.
I was run this command.

php bin/console cache:clear