# Configuration Page & SMS Channel cannot be accessed after SMS segment message created

**URL:** <https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453>\
**Category:** Product Support\
**Created:** [December 18, 2020, 2:54am UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453 "2020-12-18T02:54:26Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![131events](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/131events/32/4104_2.png) [@131events](https://forum.mautic.org/u/131events)\
**Post date:** [December 18, 2020, 2:54am UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/1 "2020-12-18T02:54:26Z")

</div>

**Your software**  
My Mautic version is: 3.1.2  
My PHP version is: 7.2.24  
My Database type and version is: AWS/RDS MySQL 8.0.20

**Your problem**  
My problem is:  
Configuration Page & SMS Channel cannot be accessed, everything else works fine.

The only change seems to have been with SMS.  
Twilio was enabled and everything has been fine for the past week.  
Today we created a new segment SMS message as a test, now when we go to the SMS channel we get a 500 “oops” error.  
Also, now the configuration page just times out.

These errors are showing in the log:

No errors in any logfile except for the following timeout -  
2020/12/18 01:59:02 [error] 4045#4045: \*14 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 68.3.179.64, server: [www.131events.net](http://www.131events.net), request: “GET /s/config HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.2-fpm.sock”, host: “[www.131events.net](http://www.131events.net)”

Steps I have tried to fix the problem:  
-restored past local.php  
-disabled Twilio  
-Increase php memory limit  
-cleared cache, restarted nginx & php…  
-tried reviewing all the other similar issues here

---

<div class="post-metadata">

**Author:** ![131events](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/131events/32/4104_2.png) [@131events](https://forum.mautic.org/u/131events)\
**Post date:** [December 18, 2020, 5:17pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/2 "2020-12-18T17:17:55Z")

</div>

It seems this is definitely connected to an SMS problem. I’ve recreated the initial error on SMS. Any ideas here?

[2020-12-18 10:15:30] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\TableNotFoundException: “An exception occurred while executing ‘SELECT COUNT(DISTINCT l.id) FROM sms\_message\_list\_xref sml INNER JOIN mautic\_lead\_lists ll ON ll.id = sml.leadlist\_id and ll.is\_published = 1 INNER JOIN mautic\_lead\_lists\_leads lll ON lll.leadlist\_id = sml.leadlist\_id and lll.manually\_removed = 0 INNER JOIN mautic\_leads l ON lll.lead\_id = l.id WHERE (sml.sms\_id = ?) AND (((l.mobile IS NOT NULL) OR (l.mobile \<\> ‘’)) OR ((l.phone IS NOT NULL) OR (l.phone \<\> ‘’))) AND (NOT EXISTS (SELECT null FROM mautic\_sms\_message\_stats stat WHERE (stat.lead\_id = l.id) AND (stat.sms\_id = 1))) AND (NOT EXISTS (SELECT null FROM mautic\_lead\_donotcontact dnc WHERE (dnc.lead\_id = l.id) AND (dnc.channel = ‘sms’))) AND (NOT EXISTS (SELECT null FROM mautic\_message\_queue mq WHERE (mq.lead\_id = l.id) AND (mq.status \<\> ‘sent’) AND (mq.channel = ‘sms’))) ORDER BY lll.lead\_id ASC’ with params [1]: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mautic.sms\_message\_list\_xref’ doesn’t exist” at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 42 {“exception”:"[object] (Doctrine\DBAL\Exception\TableNotFoundException(code: 0): An exception occurred while executing ‘SELECT COUNT(DISTINCT l.id) FROM sms\_message\_list\_xref sml INNER JOIN mautic\_lead\_lists ll ON ll.id = sml.leadlist\_id and ll.is\_published = 1 INNER JOIN mautic\_lead\_lists\_leads lll ON lll.leadlist\_id = sml.leadlist\_id and lll.manually\_removed = 0 INNER JOIN mautic\_leads l ON lll.lead\_id = l.id WHERE (sml.sms\_id = ?) AND (((l.mobile IS NOT NULL) OR (l.mobile \<\> ‘’)) OR ((l.phone IS NOT NULL) OR (l.phone \<\> ‘’))) AND (NOT EXISTS (SELECT null FROM mautic\_sms\_message\_stats stat WHERE (stat.lead\_id = l.id) AND (stat.sms\_id = 1))) AND (NOT EXISTS (SELECT null FROM mautic\_lead\_donotcontact dnc WHERE (dnc.lead\_id = l.id) AND (dnc.channel = ‘sms’))) AND (NOT EXISTS (SELECT null FROM mautic\_message\_queue mq WHERE (mq.lead\_id = l.id) AND (mq.status \<\> ‘sent’) AND (mq.channel = ‘sms’))) ORDER BY lll.lead\_id ASC’ with params [1]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mautic.sms\_message\_list\_xref’ doesn’t exist at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:42, Doctrine\DBAL\Driver\PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mautic.sms\_message\_list\_xref’ doesn’t exist at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:123, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mautic.sms\_message\_list\_xref’ doesn’t exist at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:121)"}

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [February 6, 2021, 7:53pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/3 "2021-02-06T19:53:29Z")

</div>

run **bin/console doctrine:schema:validate** to see if you have any schema problems. If so run **bin/console doctrine:schema:update --env=prod --force**

---

<div class="post-metadata">

**Author:** ![131events](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/131events/32/4104_2.png) [@131events](https://forum.mautic.org/u/131events)\
**Post date:** [February 6, 2021, 9:28pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/4 "2021-02-06T21:28:49Z")

</div>

I wondered if that was what I should do, thank you for confirming.

The configuration access issue took a while to resolve. It turned out that it was the gmail settings for monitored inbox. The setup had been working for months and then all of a sudden Gmail must have changed something so it was hanging, likely trying to validate those entries.

Really something needs to be changed in error handling for something like that. It was nearly impossible to diagnose, removing one component at a time from local.php to try and figure it out.

The SMS has still been a problem but I don’t use it much so I haven’t been back to that issue.

Thanks again, I’ll give this a shot.

---

<div class="post-metadata">

**Author:** ![131events](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/131events/32/4104_2.png) [@131events](https://forum.mautic.org/u/131events)\
**Post date:** [February 6, 2021, 9:55pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/5 "2021-02-06T21:55:11Z")

</div>

No luck with this. Same error message, base table not found.

[2021-02-06 14:53:50] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\TableNotFoundException: “An exception occurred while executing ‘SELECT COUNT(DISTINCT l.id) FROM sms\_message\_list\_xref sml INNER JOIN mautic\_lead\_lists ll ON ll.id = sml.leadlist\_id and ll.is\_published = 1 INNER JOIN mautic\_lead\_lists\_leads lll ON lll.leadlist\_id = sml.leadlist\_id and lll.manually\_removed = 0 INNER JOIN mautic\_leads l ON lll.lead\_id = l.id WHERE (sml.sms\_id = ?) AND (((l.mobile IS NOT NULL) OR (l.mobile \<\> ‘’)) OR ((l.phone IS NOT NULL) OR (l.phone \<\> ‘’))) AND (NOT EXISTS (SELECT null FROM mautic\_sms\_message\_stats stat WHERE (stat.lead\_id = l.id) AND (stat.sms\_id = 2))) AND (NOT EXISTS (SELECT null FROM mautic\_lead\_donotcontact dnc WHERE (dnc.lead\_id = l.id) AND (dnc.channel = ‘sms’))) AND (NOT EXISTS (SELECT null FROM mautic\_message\_queue mq WHERE (mq.lead\_id = l.id) AND (mq.status \<\> ‘sent’) AND (mq.channel = ‘sms’))) ORDER BY lll.lead\_id ASC’ with params [2]: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mautic.sms\_message\_list\_xref’ doesn’t exist” at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 42 {“exception”:"[object] (Doctrine\DBAL\Exception\TableNotFoundException(code: 0): An exception occurred while executing ‘SELECT COUNT(DISTINCT l.id) FROM sms\_message\_list\_xref sml INNER JOIN mautic\_lead\_lists ll ON ll.id = sml.leadlist\_id and ll.is\_published = 1 INNER JOIN mautic\_lead\_lists\_leads lll ON lll.leadlist\_id = sml.leadlist\_id and lll.manually\_removed = 0 INNER JOIN mautic\_leads l ON lll.lead\_id = l.id WHERE (sml.sms\_id = ?) AND (((l.mobile IS NOT NULL) OR (l.mobile \<\> ‘’)) OR ((l.phone IS NOT NULL) OR (l.phone \<\> ‘’))) AND (NOT EXISTS (SELECT null FROM mautic\_sms\_message\_stats stat WHERE (stat.lead\_id = l.id) AND (stat.sms\_id = 2))) AND (NOT EXISTS (SELECT null FROM mautic\_lead\_donotcontact dnc WHERE (dnc.lead\_id = l.id) AND (dnc.channel = ‘sms’))) AND (NOT EXISTS (SELECT null FROM mautic\_message\_queue mq WHERE (mq.lead\_id = l.id) AND (mq.status \<\> ‘sent’) AND (mq.channel = ‘sms’))) ORDER BY lll.lead\_id ASC’ with params [2]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mautic.sms\_message\_list\_xref’ doesn’t exist at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:42, Doctrine\DBAL\Driver\PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mautic.sms\_message\_list\_xref’ doesn’t exist at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:123, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mautic.sms\_message\_list\_xref’ doesn’t exist at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:121)"}

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [February 6, 2021, 10:19pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/6 "2021-02-06T22:19:50Z")

</div>

What was the output when you ran these two commands via SSH?  
Have you considered changing PHP version from 7.2.24 to 7.3x ?  
Any relevant logs with RDS instance?

---

<div class="post-metadata">

**Author:** ![131events](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/131events/32/4104_2.png) [@131events](https://forum.mautic.org/u/131events)\
**Post date:** [February 6, 2021, 10:36pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/7 "2021-02-06T22:36:23Z")

</div>

I’m on php 7.4 now.  
Nothing in the logs for aurora on this error, just the mautic error.

Screen shot of the two command results attached.

 ![Screen Shot 2021-02-06 at 3.34.57 PM](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/7/7ea3da25d3a5665cfd316e4b2841c755210b6932.png)

---

<div class="post-metadata">

**Author:** ![131events](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/131events/32/4104_2.png) [@131events](https://forum.mautic.org/u/131events)\
**Post date:** [February 6, 2021, 10:40pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/8 "2021-02-06T22:40:42Z")

</div>

Running validate again, I get the same failures but an OK on the database in sync.

 ![Screen Shot 2021-02-06 at 3.39.42 PM](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/d/d97829a00f89a48630c94429f4c09d5eef1c2a9d.png)

---

<div class="post-metadata">

**Author:** ![markerb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/markerb/32/4668_2.png) [@markerb](https://forum.mautic.org/u/markerb)\
**Post date:** [March 8, 2021, 10:15pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/9 "2021-03-08T22:15:32Z")

</div>

I just want to concur that I had what seems like the exact same situation, using Mautic v3.3.1. Having a wrong host entered into a configuration field completely hung the entire configuration part of Mautic.

Thanks to this post from EJL, I realized what it was. I had mistyped my host address for my monitored email. It was never able to connect, which I guess Mautic tries to do each time before it displays the configuration menu. I had to fix the error directly in the app/config/local.php. Very strange I could bring down a section of a web site with a seemingly passive typo. I hope this helps someone else!

---

<div class="post-metadata">

**Author:** ![puneetsethi25](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/puneetsethi25/32/1128_2.png) [@puneetsethi25](https://forum.mautic.org/u/puneetsethi25)\
**Post date:** [April 16, 2021, 6:39pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/10 "2021-04-16T18:39:53Z")

</div>

After a long time scratching my head finally got this bug fixed. The reason is that the table prefix is not appeded in the query which is resulting table “sms\_message\_list\_xref” not found. The fix is - to append the `MAUTIC_TABLE_PREFIX` in these 2 files -

`Line#149 in file - app/bundles/SmsBundle/Entity/Sms.php`  
` ->setJoinTable(MAUTIC_TABLE_PREFIX.'sms_message_list_xref')`  
and in Line#75 in file  
` app/bundles/SmsBundle/Entity/SmsRepository.php`  
` $q->from(MAUTIC_TABLE_PREFIX.'sms_message_list_xref', 'sml')`

its kinda funny how the dev team never checked this.

---

<div class="post-metadata">

**Author:** ![puneetsethi25](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/puneetsethi25/32/1128_2.png) [@puneetsethi25](https://forum.mautic.org/u/puneetsethi25)\
**Post date:** [April 16, 2021, 6:42pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/11 "2021-04-16T18:42:15Z")

</div>

> [@131events](#):
>
> sms\_message\_list\_xref

I got this fixed. it is a silly mistake released on prod. The MAUTIC\_TABLE\_PREFIX is not appended with the table - “sms\_message\_list\_xref”. Just append that it will be fixed

---

<div class="post-metadata">

**Author:** ![131events](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/131events/32/4104_2.png) [@131events](https://forum.mautic.org/u/131events)\
**Post date:** [April 16, 2021, 7:33pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/12 "2021-04-16T19:33:59Z")

</div>

> [@puneetsethi25](#):
>
> MAUTIC\_TABLE\_PREFIX.

Thank you! This fixed it for real this time.

---

<div class="post-metadata">

**Author:** ![localchefs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/localchefs/32/6630_2.png) [@localchefs](https://forum.mautic.org/u/localchefs)\
**Post date:** [January 14, 2022, 10:54pm UTC](https://forum.mautic.org/t/configuration-page-sms-channel-cannot-be-accessed-after-sms-segment-message-created/17453/13 "2022-01-14T22:54:48Z")

</div>

Confirming the same problem in 4.1.0 and the table prefix above change fixed the problem
