# Mautic Update Issues (Segment Tab inside Mautic Wont Open On Click!)

**URL:** <https://forum.mautic.org/t/mautic-update-issues-segment-tab-inside-mautic-wont-open-on-click/17617>\
**Category:** Mautic 3 - Install/Upgrade Support\
**Tags:** discussion\
**Created:** [December 30, 2020, 12:15pm UTC](https://forum.mautic.org/t/mautic-update-issues-segment-tab-inside-mautic-wont-open-on-click/17617 "2020-12-30T12:15:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dewale.michael](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dewale.michael/32/1591_2.png) [@dewale.michael](https://forum.mautic.org/u/dewale.michael)\
**Post date:** [December 30, 2020, 12:15pm UTC](https://forum.mautic.org/t/mautic-update-issues-segment-tab-inside-mautic-wont-open-on-click/17617/1 "2020-12-30T12:15:11Z")

</div>

**My software** Mautic v 3.0.2 (Updating to v 3.2.2)  
_My PHP version is_ : PHP Version 7.2.34 (Linus vps server)  
_MariaDB version is_ 10.3.27

**Updating Errors** From the Log file

[2020-12-30 12:12:11] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\InvalidFieldNameException: “An exception occurred while executing 'SELECT COUNT(_) AS dctrn\_count FROM (SELECT DISTINCT id\_10 FROM (SELECT m0\_.is\_published AS is\_published\_0, m0\_.date\_added AS date\_added\_1, m0\_.created\_by AS created\_by\_2, m0\_.created\_by\_user AS created\_by\_user\_3, m0\_.date\_modified AS date\_modified\_4, m0\_.modified\_by AS modified\_by\_5, m0\_.modified\_by\_user AS modified\_by\_user\_6, m0\_.checked\_out AS checked\_out\_7, m0\_.checked\_out\_by AS checked\_out\_by\_8, m0\_.checked\_out\_by\_user AS checked\_out\_by\_user\_9, m0\_.id AS id\_10, m0\_.name AS name\_11, m0\_.description AS description\_12, m0\_.alias AS alias\_13, m0\_.public\_name AS public\_name\_14, m0\_.filters AS filters\_15, m0\_.is\_global AS is\_global\_16, m0\_.is\_preference\_center AS is\_preference\_center\_17 FROM maukx\_lead\_lists m0\_ ORDER BY m0\_.name ASC) dctrn\_result) dctrn\_table’: Unknown column ‘m0\_.public\_name’ in ‘field list’" at /home/beau_\*\*\*\*\*\*\*\*/public\_html/mauticvtest/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 60 {“exception”:”[object] (Doctrine\DBAL\Exception\InvalidFieldNameException(code: 0): An exception occurred while executing 'SELECT COUNT(_) AS dctrn\_count FROM (SELECT DISTINCT id\_10 FROM (SELECT m0\_.is\_published AS is\_published\_0, m0\_.date\_added AS date\_added\_1, m0\_.created\_by AS created\_by\_2, m0\_.created\_by\_user AS created\_by\_user\_3, m0\_.date\_modified AS date\_modified\_4, m0\_.modified\_by AS modified\_by\_5, m0\_.modified\_by\_user AS modified\_by\_user\_6, m0\_.checked\_out AS checked\_out\_7, m0\_.checked\_out\_by AS checked\_out\_by\_8, m0\_.checked\_out\_by\_user AS checked\_out\_by\_user\_9, m0\_.id AS id\_10, m0\_.name AS name\_11, m0\_.description AS description\_12, m0\_.alias AS alias\_13, m0\_.public\_name AS public\_name\_14, m0\_.filters AS filters\_15, m0\_.is\_global AS is\_global\_16, m0\_.is\_preference\_center AS is\_preference\_center\_17 FROM maukx\_lead\_lists m0\_ ORDER BY m0\_.name ASC) dctrn\_result) dctrn\_table’:\n\nUnknown column ‘m0\_.public\_name’ in ‘field list’ at /home/beau_\*\*\*\*\*\*\*\*/public\_html/mauticvtest/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:60, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): Unknown column ‘m0\_.public\_name’ in ‘field list’ at /home/beau\*\*\*\*\*\*\*\*/public\_html/mauticvtest/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:86)"}

**My Issues**

1. I was unable to install the Mautic 3.2.2 update via the command line, it keeps timing out (probably internet download issues)

**STEPS I TOOK TO ADDRESS IT** :

I downloaded the v3.2.2 from the GitHub and did a manual update via CPANEL.

Installation managed through… with cache clearing… I could re-access my mautic dashboard.

**MY PROBLEM NOW**

However, the SEGMENT TAB in my instance is inaccessible… it just attempts to load… but stops and then remain on the same window.

 ![segment](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/e/ea8b3372520835f59ae156e7e13069d8f4ea2ce8.png)

_Steps I have tried to fix the problem_ :  
I have cleared cache…via Command Line… but the issue still persists though.  
(Seems to me like a database issue, but i don’t know enough to know how to find the solution)

Thank you

Please help, I appreciate your time.

@devsrealm@joeyk @EJL

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [December 30, 2020, 12:20pm UTC](https://forum.mautic.org/t/mautic-update-issues-segment-tab-inside-mautic-wont-open-on-click/17617/2 "2020-12-30T12:20:57Z")

</div>

Try updating the schema, I think that should fix it: [example.com/s/update/schema](http://example.com/s/update/schema)

---

<div class="post-metadata">

**Author:** ![dewale.michael](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dewale.michael/32/1591_2.png) [@dewale.michael](https://forum.mautic.org/u/dewale.michael)\
**Post date:** [December 30, 2020, 12:26pm UTC](https://forum.mautic.org/t/mautic-update-issues-segment-tab-inside-mautic-wont-open-on-click/17617/3 "2020-12-30T12:26:05Z")

</div>

thanks man, i got an error

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/3/363b30e16793ccf5ef7ea4fdcb2dd36eff0ce6db.png)

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [December 30, 2020, 12:28pm UTC](https://forum.mautic.org/t/mautic-update-issues-segment-tab-inside-mautic-wont-open-on-click/17617/4 "2020-12-30T12:28:02Z")

</div>

What is your last mautic log message

---

<div class="post-metadata">

**Author:** ![dewale.michael](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dewale.michael/32/1591_2.png) [@dewale.michael](https://forum.mautic.org/u/dewale.michael)\
**Post date:** [December 30, 2020, 12:30pm UTC](https://forum.mautic.org/t/mautic-update-issues-segment-tab-inside-mautic-wont-open-on-click/17617/5 "2020-12-30T12:30:37Z")

</div>

**Last Error Log**

[2020-12-30 13:23:29] mautic.ERROR: [UPGRADE ERROR] Exit code 1; ++ adding generated column generated\_sent\_date -\> ALTER TABLE maukx\_email\_stats ADD generated\_sent\_date DATE AS (CONCAT(YEAR(date\_sent), “-”, LPAD(MONTH(date\_sent), 2, “0”), “-”, LPAD(DAY(date\_sent), 2, “0”))) COMMENT ‘(DC2Type:generated)’; ALTER TABLE maukx\_email\_stats ADD INDEX `maukx_generated_sent_date_email_id`(generated\_sent\_date, email\_id) \ In AbstractMySQLDriver.php line 79: \ An exception occurred while executing ‘ALTER TABLE maukx\_email\_stats ADD ge nerated\_sent\_date DATE AS (CONCAT(YEAR(date\_sent), “-”, LPAD(MONTH(date\_sen t), 2, “0”), “-”, LPAD(DAY(date\_sent), 2, “0”))) COMMENT ‘(DC2Type:generate d)’; ALTER TABLE maukx\_email\_stats ADD INDEX `maukx_generated_sent_d ate_email_id`(generated\_sent\_date, email\_id)’: \ You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE m aukx\_email\_stats ADD INDEX `maukx_generated_sent_date_email_id`(…’ at lin e 2 \ In MysqliStatement.php line 86: \ You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE m aukx\_email\_stats ADD INDEX `maukx_generated_sent_date_email_id`(…’ at lin e 2 \ doctrine:migrations:migrate [–write-sql [WRITE-SQL]] [–dry-run] [–query-time] [–allow-no-migration] [–all-or-nothing [ALL-OR-NOTHING]] [–configuration [CONFIGURATION]] [–db-configuration [DB-CONFIGURATION]] [–db DB] [–em EM] [–shard SHARD] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–] \

---

<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:** [December 30, 2020, 2:49pm UTC](https://forum.mautic.org/t/mautic-update-issues-segment-tab-inside-mautic-wont-open-on-click/17617/6 "2020-12-30T14:49:53Z")

</div>

> [@Error updating Mautic from 3.2.1 to 3.2.2](https://forum.mautic.org/t/error-updating-mautic-from-3-2-1-to-3-2-2/17561/5):
>
> Download the update zip file. Upload it to your mautic directory, unzip overwriting the existing files. Then run doctrine:schema:update --env=prod --force I upgraded from 3.2.1-rc to 3.2.1 and then 3.2.2 with that method on a half dozen of my installs [https://forum.mautic.org/t/error-updating-from-mautic-3-2-0-rc-3-2-1/17283/5?u=ejl](https://forum.mautic.org/t/error-updating-from-mautic-3-2-0-rc-3-2-1/17283/5)

When I ran the update schema command via ssh it took FOREVER to finish. I would think it would likely timeout if ran via web. Try schema update command via SSH

---

<div class="post-metadata">

**Author:** ![dewale.michael](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dewale.michael/32/1591_2.png) [@dewale.michael](https://forum.mautic.org/u/dewale.michael)\
**Post date:** [December 30, 2020, 7:45pm UTC](https://forum.mautic.org/t/mautic-update-issues-segment-tab-inside-mautic-wont-open-on-click/17617/7 "2020-12-30T19:45:21Z")

</div>

thank you SO MUCH@EJL i appreciate your input on my issue.

I had earlier tried updating the schema via SSH but had some hiccups. But in the end these are some few steps that actually solved the issue.

@devsrealm helped with the solution.

**The steps I followed to Solve the Update Issue**

1. I made a clone of my main mautic instance and did all the update test on the clone instance.
2. Log into my mautic instance via SSH
3. I cleared mautic cache (using the command)
4. I performed the **Find\_Update** commands

Please Note after the update was completed, Mautic threw up some errors and asked i check my log file for the error details

**This is the error**

> [\*\*\*\*@vps\*\*\*\*\* mauticvtest2]# php bin/console mautic:update:apply --finish  
> Step 1 [-\>--------------------------] Migrating database schema…  
> **An error occurred while updating the database. Check log for more details**.

**LOG DETAILS OF THE ERROR**

> ] console.ERROR: Error thrown while running command “doctrine:migrations:migrate --quiet --no-interaction”. Message: “An exception occurred while executing ‘ALTER TABLE maukx\_email\_stats ADD generated\_sent\_date DATE AS (CONCAT(YEAR(date\_sent), “-”, LPAD(MONTH(date\_sent), 2, “0”), “-”, LPAD(DAY(date\_sent), 2, “0”))) COMMENT ‘(DC2Type:generated)’; ALTER TABLE maukx\_email\_stats ADD INDEX `maukx_generated_sent_date_email_id`(generated\_sent\_date, email\_id)’: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE maukx\_email\_stats ADD INDEX `maukx_generated_sent_date_email_id`(…’ at line 2” {“exception”:“[object] (Doctrine\DBAL\Exception\SyntaxErrorException(code: 0): An exception occurred while executing ‘ALTER TABLE maukx\_email\_stats ADD generated\_sent\_date DATE AS (CONCAT(YEAR(date\_sent), "-", LPAD(MONTH(date\_sent), 2, "0"), "-", LPAD(DAY(date\_sent), 2, "0"))) COMMENT ‘(DC2Type:generated)’;\n ALTER TABLE maukx\_email\_stats ADD INDEX `maukx_generated_sent_date_email_id`(generated\_sent\_date, email\_id)’:\n\nYou have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE maukx\_email\_stats ADD INDEX `maukx_generated_sent_date_email_id`(…’ at line 2 at /home/b\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/public\_html/maut\*\*\*\*test2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:79, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE maukx\_email\_stats ADD INDEX `maukx_generated_sent_date_email_id`(…’ at line 2 at /home/b \ ***/public\_html/m** t2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:86)”,“command”:“doctrine:migrations:migrate --quiet --no-interaction”,“message”:“An exception occurred while executing ‘ALTER TABLE maukx\_email\_stats ADD generated\_sent\_date DATE AS (CONCAT(YEAR(date\_sent), "-", LPAD(MONTH(date\_sent), 2, "0"), "-", LPAD(DAY(date\_sent), 2, "0"))) COMMENT ‘(DC2Type:generated)’;\n ALTER TABLE maukx\_email\_stats ADD INDEX `maukx_generated_sent_date_email_id`(generated\_sent\_date, email\_id)’:\n\nYou have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE maukx\_email\_stats ADD INDEX `maukx_generated_sent_date_email_id`(…’ at line 2”}

**THE 1ST SOLUTION FOR THIS DATABASE ERROR**

1. recursively chown your directory to your user, use: ` **sudo chown -R b*** ma****ng(use your own username):b****ma ***ng /home/b**** ma ***ng/public_html/ma***** (use-your-own-mautic-directory**)`

**NOTE**  
With this chown R command i could now access my mautic dashboad and my segment tab and every other tabs now function…

**ISSUE NO 2**  
However, when we checked the database schema status via : [https://b](https://b)**[ng.com/m](http://ng.com/m)**\*\*\*v(use\_your\_own\_mautic\_url)/s/update/schema

An error occurred while updating the database. Check log for more details.

On check the log **this is the error**

> You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE maukx\_email\_stats ADD INDEX `maukx_generated_sent_date_email_id`(…’ at line 2 (uncaught exception) at /home/beautymarketing/public\_html/mauticvtest2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 while running console command `doctrine:migrations:migrate`

**SOLUTION TO THE ISSUE**

1. Open the **local.php** file in your mautic app folder (your app/config)
2. Check if this line is there: `'db_driver' => 'pdo_mysql` (around line three)

> Mine was ‘db\_driver’ =\> ‘mysqli’

1. So I replaced **‘mysqli’` with `‘pdo\_mysql’**
2. Then save the file.

I then i try updating the schema again… This WORKED!!

1. I then updated mautic to the latest version 3.2.2  
No Issues other than inability to access my dashboard after successful update.

**The solution to this**

recursively chown your directory to your user, use: ` **sudo chown -R b*** ma****ng(use your own username):b****ma ***ng /home/b**** ma ***ng/public_html/ma***** (use-your-own-mautic-directory**)`

**NOTE**  
With this chown R command i could now access my mautic dashboad and my segment tab and every other tabs now function.

Hope this helps someone.  
Thanks @Devsrealm & @EJL

---

<div class="post-metadata">

**Author:** ![javapete](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/javapete/32/7439_2.png) [@javapete](https://forum.mautic.org/u/javapete)\
**Post date:** [December 20, 2022, 4:05pm UTC](https://forum.mautic.org/t/mautic-update-issues-segment-tab-inside-mautic-wont-open-on-click/17617/8 "2022-12-20T16:05:47Z")

</div>

> [@dewale.michael](#):
>
> pdo\_mysql

Hey @dewale.michael ,

Thank you! This worked for me on namecheap server:

- Server: Localhost via UNIX socket
- Server type: MariaDB
- Server version: 10.3.37-MariaDB-log-cll-lve - MariaDB Server
- Protocol version: 10
- Server charset: cp1252 West European (latin1)

Mautic v4.4.5
