# 500 Internal Server Error after trying to add a widget

**URL:** <https://forum.mautic.org/t/500-internal-server-error-after-trying-to-add-a-widget/23041>\
**Category:** Product Support\
**Created:** [March 14, 2022, 10:57pm UTC](https://forum.mautic.org/t/500-internal-server-error-after-trying-to-add-a-widget/23041 "2022-03-14T22:57:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jribeiro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jribeiro/32/1003_2.png) [@jribeiro](https://forum.mautic.org/u/jribeiro)\
**Post date:** [March 14, 2022, 10:57pm UTC](https://forum.mautic.org/t/500-internal-server-error-after-trying-to-add-a-widget/23041/1 "2022-03-14T22:57:57Z")

</div>

**Your software**  
My Mautic version is: 4.1.2  
My PHP version is: 7.4  
My Database type and version is: mySQL

**Your problem**  
My problem is: After tried to add a widget (emails sent) I am receiving a 500 error and can not open the dashboard, then I can not access to the Mautic system after login

#### **500** Internal Server Error

These errors are showing in the log:  
[2022-03-14 23:52:05] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: “An exception occurred while executing ‘SELECT s.id, s.lead\_id, s.email\_address, s.is\_read, s.email\_id, s.date\_sent, s.date\_read, e.name AS email\_name, COUNT(ph.id) AS link\_hits, c.id AS company\_id, c.companyname AS company\_name, campaign.id AS campaign\_id, campaign.name AS campaign\_name, ll.id AS segment\_id, ll.name AS segment\_name FROM email\_stats s LEFT JOIN emails e ON s.email\_id = e.id LEFT JOIN page\_hits ph ON ph.source = “email” and ph.source\_id = s.email\_id and ph.lead\_id = s.lead\_id LEFT JOIN companies\_leads cl ON s.lead\_id = cl.lead\_id LEFT JOIN companies c ON cl.company\_id = c.id LEFT JOIN campaign\_events ce ON s.source = “campaign.event” and s.source\_id = ce.id LEFT JOIN lead\_lists ll ON s.list\_id = ll.id LEFT JOIN campaigns campaign ON ce.campaign\_id = campaign.id WHERE s.date\_sent BETWEEN ? AND ? GROUP BY s.id ORDER BY s.id DESC LIMIT 6’ with params [“2022-02-14 00:00:00”, “2022-03-14 00:00:00”]: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #10 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘marketingesdb.c.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql\_mode=only\_full\_group\_by” at /home/lastanza/marketinges/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 128 {“exception”:“[object] (Doctrine\DBAL\Exception\DriverException(code: 0): An exception occurred while executing ‘SELECT s.id, s.lead\_id, s.email\_address, s.is\_read, s.email\_id, s.date\_sent, s.date\_read, e.name AS email\_name, COUNT(ph.id) AS link\_hits, c.id AS company\_id, c.companyname AS company\_name, campaign.id AS campaign\_id, campaign.name AS campaign\_name, ll.id AS segment\_id, ll.name AS segment\_name FROM email\_stats s LEFT JOIN emails e ON s.email\_id = e.id LEFT JOIN page\_hits ph ON ph.source = "email" and ph.source\_id = s.email\_id and ph.lead\_id = s.lead\_id LEFT JOIN companies\_leads cl ON s.lead\_id = cl.lead\_id LEFT JOIN companies c ON cl.company\_id = c.id LEFT JOIN campaign\_events ce ON s.source = "campaign.event" and s.source\_id = ce.id LEFT JOIN lead\_lists ll ON s.list\_id = ll.id LEFT JOIN campaigns campaign ON ce.campaign\_id = campaign.id WHERE s.date\_sent BETWEEN ? AND ? GROUP BY s.id ORDER BY s.id DESC LIMIT 6’ with params ["2022-02-14 00:00:00", "2022-03-14 00:00:00"]:\n\nSQLSTATE[42000]: Syntax error or access violation: 1055 Expression #10 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘marketingesdb.c.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql\_mode=only\_full\_group\_by at /home/lastanza/marketinges/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128, Doctrine\DBAL\Driver\PDO\Exception(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #10 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘marketingesdb.c.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql\_mode=only\_full\_group\_by at /home/lastanza/marketinges/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #10 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘marketingesdb.c.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql\_mode=only\_full\_group\_by at /home/lastanza/marketinges/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112)”}

Steps I have tried to fix the problem:

- [doctrine:schema:update --force] and clear cache.  
restart database

---

<div class="post-metadata">

**Author:** ![jribeiro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jribeiro/32/1003_2.png) [@jribeiro](https://forum.mautic.org/u/jribeiro)\
**Post date:** [March 15, 2022, 2:41pm UTC](https://forum.mautic.org/t/500-internal-server-error-after-trying-to-add-a-widget/23041/2 "2022-03-15T14:41:44Z")

</div>

I can access to the Mautic writing the exact url of other options but not to the dashboard

---

<div class="post-metadata">

**Author:** ![Mustapha](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mustapha/32/6605_2.png) [@Mustapha](https://forum.mautic.org/u/Mustapha)\
**Post date:** [October 17, 2022, 11:57am UTC](https://forum.mautic.org/t/500-internal-server-error-after-trying-to-add-a-widget/23041/3 "2022-10-17T11:57:10Z")

</div>

I had the same exact problem today. What I did I deleted the latest widget row “sent emails” from the “ma\_widgets” table. The dashboard loaded again.
