Suddenly Mautic starts hanging on saving an email

One of my Mautic installs are on v2.15.2.
I cannot upgrade, since there are way too many bugs in the versions after this one.

The problem is that suddenly Mautic starts hanging on saving an email.

I already flushed all caches: cloudflare cache , browser cache and deleted Mautic cache. Nothing works.

The hanging occurs because a POST request to /s/emails/edit/103/ returns a 403 forbidden error. (103 is the email ID)

I can, of course, navigate to this page, but when Mautic does a post to this URL, it returns a 403 forbidden.

This setup worked for months. But suddenly I get this error. I did not change anything.

See screenshot below:

Any ideas?

Did you check the permissions on the server? Something changed over there maybe?

Yes, It’s the same as it was before. Besides I CAN access all files, but only with the POST action, it returns this 403. So I don’t think it’s related to file permissions.

Need to figure out what the POST request does when saving an email. It looks like the triggered action is bumping its head somewhere…

A POST command writes data to the database. Is it possible some content in your email causes the issue? maybe it has some special characters?

Even with an empty email it returns this error.

Does this occur when you create a new email from scratch? You might as well recheck your directory permission, and if you are using apache, check if there isn’t an incorrect setting in .htacess

I CAN create new emails. But I cannot edit them afterwards.

This error happens with new emails as well with older emails.

As soon as I click the save button, this save button disables and it keeps spinning forever.

So when I look in the console (Chrome), while it spins, it shows me this error.

When I refresh the page, I see that the changes were not saved.

I will recheck all dir permissions and .htaccess files…

Thank you

Yh, check that and let’s know how it goes.

Try to nuke the cache folder - rm -r /path/to/cache

I completely removed the cache folder. It is recreated automatically. But the problem persists. Checked all the folder permissions. All are good. .htaccess files are good too.

The problem is that this is a live situation. I just cannot do crazy things like upgrading (which IS a crazy thing with Mautic)…

I just discovered that other save actions fail too…

I will now try to duplicate everything in another subdomain. Let’s see if I replicate the error too. If yes, Then I can start doing crazy things…

I found the cause of the problem (with the help of the server admin).

You won’t believe it.

It’s WordFence firewall, operating OUTSIDE of the WordPress boundaries, in a subdomain. This F*cker was sneakily blocking “unsafe” post requests, without warning me.

After whitelisting these so called “unsafe” actions, Mautic went back to working normally.

So IF you have WordPress + WordFence on and you run Mautic on a subdomain, i.e., then no matter what… CHECK WordFence if you’re running into Mautic trouble.

Even if your Mautic runs on a completely separated subdomain.

Weird but true…


Thanks for reporting back the issue resolution! Glad you got it figured out in the end!

1 Like

How did you whitelisted the unsfae actions? I’m having the same problem and is Wordfence that is blocking Mautic.

@rcheesley , I think that this is something to write about in the documentation…