Mautic Notification and repeated 500 error after update to 4.2

It should because you are working just with source code, but have a backup of entire instance of course (database + source)

1 Like

This what I did …

deleted /vendor/ folder
git pull to update mautic to latest
composer install --no-dev

But it gave me this screen

I am going to see if it will let me use command to delete cache without error this time …

No go …

bin/console cache:clear

In DecoratorFactory.php line 45:

  Too few arguments to function Mautic\LeadBundle\Segment\Decorator\Decorator
  Factory::__construct(), 5 passed in /home/agwmadmin/mas.agwm.org/var/cache/
  prod/ContainerG9g1P3L/appAppKernelProdContainer.php on line 5234 and exactl
  y 6 expected

it seems any bin/console commands (update, update database, clear cache etc) will give off the same error as above.

I thought you were using composer based install? If you are using git then you should (from mautic root folder):

rm -rf vendor
git pull origin 4.x --tags
git checkout 4.2.1
composer install --no-dev

I got it working again. The console even works now too

Here what I did to fix it …

download local.php to save a copy
delete everything in /mautic/ folder
grab a zip from mautic git repo
extract zip content into /mautic/ folder
upload local.php into /app/config/ folder
composer install --no-dev
bin/console doctrine:migration:migrate --no-interaction
bin/console doctrine:schema:update --no-interaction --force

Running at 4.2.1 now …

When I tried to install with composer based install, it give me errors or something like this when I do the
composer require mautic/mautic-saelos-bundle:~2.0 part in document and I noticed it get installed in docroot folder where it doesn’t load to the web address I wanted it to load from so something is not set up correctly in htaccess by composer install

Its good that you got it working. Still I am surprisedcomposer based install did not work out. I will give it a shot once I get a chance

The composer base set up and install Mautic in /docroot/ folder which mean you have to set up your web configuration to point the domain to /docroot/ folder

Suppose your folder is var/www/html/ and you want to switch to composer then you have to edit your rootdocument in your httpd .conf file to change it to var/www/hrml/docroot to use the compose installed Mautic.

I get around to it by downloading the zip from git repo and just unzip the file into the actual rootdocument of my web server then ssh in and do a composer install from there.

I don’t have any experience with composer type of install so I can’t say why it is decided by Mautic developer to using “extra second” sub-folder as the rootdocument that seems to be the main issue for most of us.

It will be a huge problem for those who host from virtual server like cPanel or Plesk etc and unless they are sysop themselves then they are at the mercy of the sysop to go edit their httpd conf file and rebuilt the apache to serve the files in a different rootdocument than the ones that was originally set up for virtual server.

Lucky, I own my own server and I am a sysop for another server so I pretty much access to everything to experiment and do trail testing with.

I think they need to put the documentroot back to the main folder /public_html/ or /html/and eliminate the /docroot/ altogether for composer install or they are going to be facing lots of cry for support help.

Instead of rebuilding httpd (apache), anyone still can edit the htaccess to re-serve the documentroot but htaccess “redirect or re-serve” is not very search engine friendly. You must have the skill and knowledge of doing htaccess correctly or otherwise even if you get it working with htaccess method, it still could come up in search engine as domainame.com/docroot/ instead of domainame.com

If developer want to offer Mautic to a wider audience then they need to avoid the method where it could involve a task only accessible by a sysop or needing a high knowledge of writing your own htaccess to make it work and still be search engine friendly.

If it was me, I would leave the documentroot as it is then again Mautic developer may have a valid reason to move it to its own folder within the documentroot.