I’ve just updated my installation to M3, and updated my cron jobs, but I’m getting the following error on all 3 jobs:
/var/www/vhosts/[redacted]/bin/console mautic:campaigns:trigger" completed with error in 0 seconds, output:
PHP Warning: Class ‘Tightenco\Collect\Support\LazyCollection’ not found in /var/www/vhosts/[redacted]/vendor/tightenco/collect/src/Collect/Support/alias.php on line 19
PHP Parse error: syntax error, unexpected ‘=’ in /var/www/vhosts/[redacted]/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php on line 611
ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn’t reliably detect the amount of available database migrations. Please try again by refreshing this page.
However, I think that was more to do with a PHP timeout, as it all went through fine after I refreshed. I’ve also updated the timeout settings in php so scripts can run for 240 seconds just in case it causes issues in the future
@coffeeandspice
I was also seeing some slowness on Plesk Obsidian, increasing the timeout helped there. It’s indeed possible to refresh the page when you’re doing the UI upgrade to continue the process where it stalled, so I think your database should be OK.
You seem to be using the correct PHP and MySQL versions, so that looks good to me. Saw a similar error in https://github.com/tightenco/collect/issues/181 but there the user was running the wrong PHP version.
At this point I’m not sure what is causing this warning to show up for you. Could you maybe, just to be sure, remove your cache folder and try again? Does that make any difference?
I’ve come across those threads as well. The tighten/collect seems to be causing issues for multiple people, so maybe it needs to be looked into?
I had already tried deleting the cache. For some reason on plesk, I always have to go to the CLI and change the ownership of the cache files for things to work normally again. This started happening after having to revert to a backup in the past.
As this is a live version of mautic that I actually need running, I’ve reverted back to 2.16.3. Would there be a way to create a fresh install of V3 and link it to the existing database? When I create fresh installs things seem to work so much better.
@coffeeandspice you can theoretically set up a fresh installation of V3, then restore your M2 database to it and run bin/console doctrine:migrations:migrate --no-interaction for the M3 database migrations to run. If you had any custom settings/plugins/themes you’ll need to restore those from the M2 installation. For an overview of the configuration parameters that have changed in M3, see https://github.com/mautic/mautic/blob/d28710f8d6ccde404fbedb2b556c6e64f44342f9/UPGRADE-3.0.md#configuration. We haven’t tested this so not sure it will work as expected.
The Mautic 3 upgrade script does actually remove the old M2 installation completely (then restores settings/plugins/themes/media from M2) and creates fresh cache, so there shouldn’t be any reason for it not to work.
Would you mind trying the following:
Copy the M2 instance in Plesk using the “Copy website” feature, to e.g. a subdomain mysubdomain.mydomain.com
Set the PHP timeout to 480 on the site in Plesk
Run the upgrade script again on your cloned version
Curious to hear if that will work; I’m just trying to understand whether this is a local (server-related) issue or whether we need to make some changes to the upgrade script. Thanks in advance!
[16-Aug-2020 10:08:00 UTC] PHP Warning: Class ‘Tightenco\Collect\Support\LazyCollection’ not found in …/vendor/tightenco/collect/src/Collect/Support/alias.php on line 19
[16-Aug-2020 10:08:00 UTC] PHP Parse error: syntax error, unexpected ‘=’ in …/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php on line 611
It was because MAUTIC requires PHP 7.2 and even though I had upgraded an htaccess setting had it at 7.0 still.
I also got a memory error after that was fixed:
[16-Aug-2020 10:53:07 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes) in /home/jewishdata/public_html/newsletter/app/bundles/LeadBundle/Model/CompanyModel.php on line 367
[16-Aug-2020 10:53:07 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes) in /home/jewishdata/public_html/newsletter/vendor/psr/log/Psr/Log/LogLevel.php on line 1
Which we fixed by increasing the allotted memory via an ini file.
I also have this error, but my PHP is 7.3 . Mautic version 3.2.1. MySQL
Mautic was working correctly, but when I tried to whitelist the IP address of CloudFlare and the A2hosting host, I changed the configuration settings on Mautic dashboard.
Now I cannot access Mautic and instead have these messages:
Warning : Class ‘Tightenco\Collect\Support\LazyCollection’ not found in /home/mautic.mysite.com/vendor/tightenco/collect/src/Collect/Support/alias.php on line 19
Parse error : syntax error, unexpected ‘=’ in /home/mautic.mysite.com/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php on line 611
Now even if I turn back the previous local.php file which I made a copy I have not even the previous 404. I have removed the content of the cache folder also.
I would appreciate so much any kind of help or suggestions.
Thank you in advance