Email Template Creation, Builder, and Landing Pages Not Working

Your software
My Mautic version is: 5.2.3 (also tried Mautic 6 with the same errors)
My PHP version is: 8.2
My Database type and version is: MySQL
I am hosted on Hostinger with a shared plan.

Your problem
Everything works correctly in Mautic, except for the creation of certain email templates and landing pages. The “1:2:1 columns” theme works, and I can save it without any issues, but the “1:2 column” theme does not. Additionally, I have not been able to save any new email using the builder, and the same error applies for landing pages. I always get the error:
“Your request could not be processed, please try again.”

In the browser’s JavaScript console, I see the following error:

[Error] Failed to load resource: the server responded with a status of 403 ()
URL: https:/mysiteXXXX.com/s/emails/new?mauticUserLastActive=26&mauticLastNotificationId=…

However, I am able to create contacts, forms, assets, and companies without any issues.

Steps I have tried to fix the problem:
Checked different PHP versions
Checked the file and folder permissions.
Verified the logs in /var/log/mautic.log.
Attempted to troubleshoot with browser developer tools to address the JavaScript error and the 403 error.
Set the log level to debug in /config/config_prod.php to capture more detailed error information.
Despite these efforts, the problem persists. Can anyone provide further guidance on resolving the issue?

Thank you in advance for your help!

Best regards,
Wuini

Hi, I keep investigating. I see this error un chrome javascript console. Any ideas? Thanks a lot.

POST https://mydoamin/emails/new?mauticUserLastActive=70&mauticLastNotificationId= 403 (Forbidden)

libraries.js?v870a45cc:684

POST Mautic 403 (Forbidden)

send @ libraries.js?v870a45cc:684

ajax @ libraries.js?v870a45cc:661

$.fn.ajaxSubmit @ libraries.js?v870a45cc:1631

Mautic.postForm @ app.js?v870a45cc:289

postForm @ builder.js?v870a45cc:10

applyForm @ builder.js?v870a45cc:10

e.callRun @ builder.js?v870a45cc:1

e.runCommand @ builder.js?v870a45cc:1

e.updateActive @ builder.js?v870a45cc:1

m @ builder.js?v870a45cc:1

f @ builder.js?v870a45cc:1

l @ builder.js?v870a45cc:1

s.trigger @ builder.js?v870a45cc:1

set @ builder.js?v870a45cc:1

set @ builder.js?v870a45cc:1

e.toggleActive @ builder.js?v870a45cc:1

e.clicked @ builder.js?v870a45cc:1

t @ builder.js?v870a45cc:1

And I see this if I click on
send @ libraries.js?v870a45cc:684

callback = callback(“abort”);
try {
xhr.send(options.hasContent && options.data || null)
} catch (e) {
if (callback) {
throw e
}
}

Hello @wuini

[Error] Failed to load resource: the server responded with a status of 403 ()
URL: https:/mysiteXXXX.com/s/emails/new?mauticUserLastActive=26&mauticLastNotificationId=…

It looks like your issue may be related to server permissions or security rules blocking specific requests.

Since you’re on shared hosting, it’s likely that ModSecurity or another firewall system is interfering with Mautic’s functionality. Shared hosting is not ideal for Mautic, as mentioned in the official documentation.

To troubleshoot, try the following steps:

  1. Temporarily disable ModSecurity or the Hostinger firewall and test if the issue persists. If the error disappears, re-enable it and check if specific rules can be adjusted.
  2. Verify folder and file permissions: Directories should be 755, and files should be 644.
  3. Check your cPanel error logs for more details on what might be causing the 403 error.
  4. Clear Mautic cache.
  5. Just to make sure, try a different browser and clear both the browser cache and Mautic cache to rule out local issues.

Let me know if it the problem persists.
Best regards,
Ricardo

Thanks Ricfreire. I’ve tried almost everything you listed except Temporarily disable ModSecurity or the Hostinger firewall. I’ve checked:

  • Verify folder and file permissions. I’ve tried using ssh commands and hostinger fix file permissions action
  • Check your cPanel error logs: I can’t see the error 403 I’m getting in the analytics hostinger dashboard.
  • Clear Mautic cache. I’ve reinstalled muatic several times even.
  • I’ve tried different browsers. All in my now laptop though.

I will check how to disable ModSecurity

Thanks a lot

1 Like

Hi,

I keep investigating with Chrome javascript console. And I’ve seen this. Could the strict-origin-when-cross-origin be the issue? What drives me crazy is that some email templates always work. It just affects some of them.

General
Request URL:

Request Method:
POST
Status Code:
403 Forbidden
Remote Address:
147.79.116.227:443
Referrer Policy:
strict-origin-when-cross-origin

thanks,
W

I fixed it with the support of the hostinger support.

"Try also disabling CDN to see if firewall in CDN blocks it.

Thanks for patiently waiting. It seems that the issue is related to the CDN firewall blocking the script of the demo theme - to make it working and for the CDN to whitelist the demo, disable first the CDN."

That fixed it

Thanks you all.
W

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.