mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException:

After Mautic Update to the Latest release, WEbhooks page won’t open anymore. Also Campaign stops on middle of batch process. The only error i could capture from this behavior was the following:



mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: “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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’" at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 {“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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’:nnSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104)”} [] [2017-10-19 11:04:59] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: “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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’" at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 {“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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’:nnSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104)”} [] [2017-10-19 11:05:08] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: “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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’" at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 {“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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’:nnSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104)”} []

After Mautic Update to the Latest release, WEbhooks page won’t open anymore. Also Campaign stops on middle of batch process. The only error i could capture from this behavior was the following:

mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: “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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’" at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 {“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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’:nnSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104)”} [] [2017-10-19 11:04:59] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: “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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’" at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 {“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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’:nnSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104)”} [] [2017-10-19 11:05:08] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: “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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’" at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 {“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_.webhook_url AS webhook_url_13, m0_.events_orderby_dir AS events_orderby_dir_14 FROM mautic_webhooks m0_ LEFT JOIN mautic_categories m1_ ON m0_.category_id = m1_.id ORDER BY m0_.name ASC) dctrn_result) dctrn_table’:nnSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘m0_.events_orderby_dir’ in ‘field list’ at /home/voicedia/app.voicedialogue.tv/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104)”} []

Try fixing your database schema. Go to http://[your-mautic-url]/s/update/schema. It will update your database schema if there are some known updates to be applied.

I had the same problem, and it works fine now.

If it still fails, try looking at the general troubleshooting in the docs https://mautic.org/docs/en/tips/troubleshooting.html

3 Likes

update php please

1 Like

Thanks you so much, I was doing google for 4 day’s but, after updating the schema my problem got fixed

Same here :slight_smile: