# Mautic Notification and repeated 500 error after update to 4.2

**URL:** https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388
**Category:** General Discussion
**Created:** [March 30, 2022, 3:59pm UTC](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388 "2022-03-30T15:59:16Z")
**Posts on this page:** 10
**Page:** 2

<div class="post-metadata">

### Author: ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)
#### Post date: [April 1, 2022, 2:47pm UTC](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388/21 "2022-04-01T14:47:22Z")

</div>

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

---

<div class="post-metadata">

### Author: ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)
#### Post date: [April 1, 2022, 3:05pm UTC](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388/22 "2022-04-01T15:05:46Z")

</div>

This what I did …

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

But it gave me this screen

 ![Screen Shot 2022-04-01 at 10.05.06 AM](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/0/0b6c5c1d2608fa9d3c9e894edfc2dfe44b27b391.jpeg)

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

---

<div class="post-metadata">

### Author: ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)
#### Post date: [April 1, 2022, 3:07pm UTC](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388/23 "2022-04-01T15:07:19Z")

</div>

No go …

`bin/console cache:clear`

```auto
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

```

---

<div class="post-metadata">

### Author: ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)
#### Post date: [April 1, 2022, 3:11pm UTC](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388/24 "2022-04-01T15:11:25Z")

</div>

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

---

<div class="post-metadata">

### Author: ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)
#### Post date: [April 1, 2022, 3:38pm UTC](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388/25 "2022-04-01T15:38:45Z")

</div>

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

---

<div class="post-metadata">

### Author: ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)
#### Post date: [April 1, 2022, 3:47pm UTC](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388/26 "2022-04-01T15:47:43Z")

</div>

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 …

---

<div class="post-metadata">

### Author: ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)
#### Post date: [April 1, 2022, 4:37pm UTC](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388/27 "2022-04-01T16:37:19Z")

</div>

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

---

<div class="post-metadata">

### Author: ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)
#### Post date: [April 1, 2022, 5:51pm UTC](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388/28 "2022-04-01T17:51:27Z")

</div>

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

---

<div class="post-metadata">

### Author: ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)
#### Post date: [April 1, 2022, 6:19pm UTC](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388/29 "2022-04-01T18:19:03Z")

</div>

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/](https://domainame.com/docroot/) instead of [domainame.com](https://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.

---

<div class="post-metadata">

### Author: ![alexhammer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexhammer/32/14525_2.png) [@alexhammer](https://forum.mautic.org/u/alexhammer)
#### Post date: [February 13, 2025, 10:37am UTC](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388/30 "2025-02-13T10:37:21Z")

</div>

I know this is an old topic but to make the forum useful if someone runs into this problem again:

1. take a look at the official [Mautic Docs](https://docs.mautic.org/en/5.x/)

2. if you run into this classic Mautic is offline error: clear the cache AND check the read/write permissions of your mautic user (in the server/vps): usually this is www-data. Your Mautic user (www-data) needs to have the rights to read and write folders on your server. You can give it the rights again if you do:  
`chown -R www-data:www-data /path/to/mautic/ && chmod -R 755 /path/to/mautic/`

3. if you have apache running to server your mautic to the outside world you don’t change anything in .htaccess of mautic. This will be overwritten at the next update. But you change your Virtual Hosts file. You created this file when setting up Mautic on your vps. This file usually sits in the folder: `/etc/apache2/sites-available/yourmautic.conf` of course you need to find the filename you gave it. Inside this file find the line `DocumentRoot /path/to/your/old/mautic/` and change it to `DocumentRoot /path/to/your/new/docroot/mautic/` do the same for the path in the `<Directory /path/to/your/old/mautic/>` line.

4. restart apache. If you don’t know how to do this, reboot your server.

5. clear the mautic cache and give again the correct read and write permissions.  
I found from many years of giving Mautic Support, that most people act as root inside their server. If you are one of those, be aware that if you are clearing the cache as root via console command or even if your just delete your cache folder, then the read and write permissions changed from www-data (your mautic user) to root. So you need to revert that.

Hope this helps the people who stumble upon this 🙂

[Previous page](https://forum.mautic.org/t/mautic-notification-and-repeated-500-error-after-update-to-4-2/23388.md?page=1)
