Mautic 404 error after installation

Your software
My Mautic version is: 5.22
My PHP version is: 8.2
My Database type and version is: SQL

Your problem
My problem is:

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

These errors are showing in the log: Can’t see anything log files

Steps I have tried to fix the problem:

First, can I run Mautic 5.22 on a shared hosting?

I have tried clearing cache, re-installing everything, it seems there is an issue with the path and .htaccess. Problem happens after running install and trying to login for the first time. If I rem the .htaccess file, I’m able to get to the login screen by adding /index.php after the Mautic directory but when I loggin I get redirected to the 404 message

Any ideas?

Thanks

John

hey there,

can you let us know what web server you are running, apache2/nginx ? and maybe share the header of the conf files

Hey Mikew, thanks for getting back, I actually fixed it, it was a problem with the.htaccess file, I simply copied their posted file, solution is here: [upgrade] 4.1.2 to 4.2.0 issue with .htaccess · Issue #10913 · mautic/mautic · GitHub. I’m not sure about the webserver as I’m running a shared hosting with Dreamhost. I have another issue, maybe you can help as well? I’m getting this error when submitting a created form in Mautic that I embeded on one of my domains and each time I send, I get this error: > # Uh oh! I think I broke it. If I do it again, please report me to the system administrator!

500 Internal Server Error

Mautibot

Report an issue. I tried playing around with: CORS Settings but no luck, any ideas? Thanks, John

a few things here.

  1. If you do not have access to the file manager and cannot see the web server logs, you should check in the mautic logs (Settings → System Info → Log) and see what is happening there.
  2. When you get the error (if you on Chrome) inspect the page and look to see if you have any errors in the console that will help with debugging.
  3. Check your base url inside configuration and then go to forms, click the checkbox for that particular form and on the top checkbox there is a dropdown to rebuild the cache.
  4. As you have had .htacess issues could be something with the web configuration

Thanks for getting back,

I found the log /var/logs is there another one somewhere else? Here’s the content of the log file: [2025-02-08T04:46:55.907077+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:3039818}
[2025-02-08T04:49:53.171406+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:3045282}
[2025-02-08T04:53:06.574361+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:22798}
[2025-02-08T06:08:09.674331+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:593025}
[2025-02-08T08:36:10.625860+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:1722483}
[2025-02-08T09:03:06.541395+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:1965738}
[2025-02-08T10:13:07.730379+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:2594951}
[2025-02-08T12:03:09.466740+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:427569}
[2025-02-08T12:40:07.488788+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:714294}
[2025-02-08T15:19:10.992771+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:1907666}
[2025-02-08T15:50:21.875985+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:2125733}
[2025-02-08T16:20:08.798852+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:2382120}
[2025-02-08T17:44:08.770962+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:3057873}
[2025-02-08T19:04:12.520080+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:623506}
[2025-02-08T19:59:07.776127+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:1134970}
[2025-02-08T20:05:08.109695+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:1189242}
[2025-02-08T20:26:06.183380+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:1384373}
[2025-02-08T23:11:10.588205+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:2803932}
[2025-02-08T23:41:07.393402+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310” at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php line 15 {“exception”:“[object] (TypeError(code: 0): Mautic\CoreBundle\Helper\EmojiHelper::toHtml(): Argument #1 ($text) must be of type string, null given, called in /home/dh_b745ze/webprosppc.com/app/bundles/EmailBundle/EventListener/BuilderSubscriber.php on line 310 at /home/dh_b745ze/webprosppc.com/app/bundles/CoreBundle/Helper/EmojiHelper.php:15)”} {“hostname”:“iad1-shared-b8-05”,“pid”:3017086}

I see this error under: Inspect

Uncaught TypeError: Cannot read properties of null (reading ‘addEventListener’)
at share-modal.js:1:135

I tried your tip 3 also, no luck,

Thanks

Also I tried removing the redirect after form send, to stay on the page but still I get the same error, so basically it’s redirecting to the Mautic domain when clicking on the landing page send form button which is on another domain, so it default back to the Mautic domain: https://www.webprosppc.com/form/submit?formId=1

Check permission

Thanks, you mean all files-folders in the Mautic directory? Now I have this issue: The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.

1 Like

yes check permission of cache 777