Dashboard displays Error 500

Your software
My Mautic version is: 4.2.0
My PHP version is: 7.4.0
My Database type and version is: mySQL5.7.38-0ubuntu0.18.04.1

Your problem
My problem is:

My Mautic installation works fine, but I can’t access the dashboard. I get an error 500 when trying

These errors are showing in the log:

[2022-08-02 09:16:52] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 10:47:46] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 11:36:16] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 11:36:24] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 11:36:29] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 13:22:35] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 13:22:47] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 15:16:49] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:20:39] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:20:50] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:22:08] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:22:26] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:22:31] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:22:41] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:22:52] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:23:53] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:24:31] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:24:46] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:25:51] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:29:02] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}
[2022-08-02 16:30:24] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Call to a member function createQueryBuilder() on null” at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php line 79 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function createQueryBuilder() on null at /home/at10309/web/marketing.nastu.ch/public_html/app/bundles/EmailBundle/Stats/Helper/FilterTrait.php:79)”}

Steps I have tried to fix the problem:

None yet, asI have no clue what I could have done to trigger this error

Try deleting everything in your
/var/cache/
folder

@techbill Thank you for your feedback!
Unfortunately deleting the cache did not help.

I hope you did not delete the /var/cache/ but what is inside the /cache/ folder. If you deleted the /cache/ itself then recreate the cache folder again and set the permission on it.

Did you enable or edit any widget etc?

I actually renamed the /cache/ folder and a new /cache/ folder recreated itself within seconds.

I added an e-mail-related widget to the dashboard today but thought that I had already removed it because it did not show what I expected.

Just to be clear - I can access all pages in Mautic besides the dashboard. If I click on [Dashoard] in the navigation it does not load and if I manually add “/s/dashboard” to my mautic domain I get a “500 Internal Server Error” …

Reason I asked about widget because your error seem very similar to this one reported over at Mautic crashed: internal server error after editing dashboard "Best email read hours" widget · Issue #10640 · mautic/mautic · GitHub

1 Like

@techbill - THANK YOU A LOT for pointing me to that topic.

Changing …

a:4:{s:10:“timeFormat”;N;s:9:“companyId”;s:0:“”;s:10:“campaignId”;N;s:9:“segmentId”;i:148;}

… to …

a:0:{}

… did the trick. My dashboard works again :+1:

1 Like

Awesome!

Glad you got your dashboard back!

1 Like