Cannot see Contact Information after update

Your software Mautic 4.1.2
My PHP version is : 7.4.26
My MySQL/MariaDB version is (delete as applicable): mysqlnd 7.4.26

Updating/Installing Errors
I am : Updating
Upgrading/installing via: Command Line

These errors are showing in the installer : no errors were shown

These errors are showing in the Mautic log :
[2022-02-19 01:23:44] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\InvalidFieldNameException: “An exception occurred while executing ‘SELECT t0.id AS id_1, t0.label AS label_2, t0.show_label AS show_label_3, t0.alias AS alias_4, t0.type AS type_5, t0.is_custom AS is_custom_6, t0.custom_parameters AS custom_parameters_7, t0.default_value AS default_value_8, t0.is_required AS is_required_9, t0.validation_message AS validation_message_10, t0.help_message AS help_message_11, t0.field_order AS field_order_12, t0.properties AS properties_13, t0.validation AS validation_14, t0.parent_id AS parent_id_15, t0.conditions AS conditions_16, t0.label_attr AS label_attr_17, t0.input_attr AS input_attr_18, t0.container_attr AS container_attr_19, t0.lead_field AS lead_field_20, t0.save_result AS save_result_21, t0.is_auto_fill AS is_auto_fill_22, t0.show_when_value_exists AS show_when_value_exists_23, t0.show_after_x_submissions AS show_after_x_submissions_24, t0.always_display AS always_display_25, t0.form_id AS form_id_26 FROM form_fields t0 WHERE t0.form_id = ? ORDER BY t0.field_order ASC’ with params [4]: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘t0.parent_id’ in ‘field list’” at /home/u270484841/domains/cristinadurante.com.br/public_html/mail/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 {“exception”:"[object] (Doctrine\DBAL\Exception\InvalidFieldNameException(code: 0): An exception occurred while executing ‘SELECT t0.id AS id_1, t0.label AS label_2, t0.show_label AS show_label_3, t0.alias AS alias_4, t0.type AS type_5, t0.is_custom AS is_custom_6, t0.custom_parameters AS custom_parameters_7, t0.default_value AS default_value_8, t0.is_required AS is_required_9, t0.validation_message AS validation_message_10, t0.help_message AS help_message_11, t0.field_order AS field_order_12, t0.properties AS properties_13, t0.validation AS validation_14, t0.parent_id AS parent_id_15, t0.conditions AS conditions_16, t0.label_attr AS label_attr_17, t0.input_attr AS input_attr_18, t0.container_attr AS container_attr_19, t0.lead_field AS lead_field_20, t0.save_result AS save_result_21, t0.is_auto_fill AS is_auto_fill_22, t0.show_when_value_exists AS show_when_value_exists_23, t0.show_after_x_submissions AS show_after_x_submissions_24, t0.always_display AS always_display_25, t0.form_id AS form_id_26 FROM form_fields t0 WHERE t0.form_id = ? ORDER BY t0.field_order ASC’ with params [4]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘t0.parent_id’ in ‘field list’ at /home/u270484841/domains/cristinadurante.com.br/public_html/mail/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:79, Doctrine\DBAL\Driver\PDO\Exception(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘t0.parent_id’ in ‘field list’ at /home/u270484841/domains/cristinadurante.com.br/public_html/mail/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘t0.parent_id’ in ‘field list’ at /home/u270484841/domains/cristinadurante.com.br/public_html/mail/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112)"}

Your problem
My problem is :
I cannot see contacts/leads details on my mautic.

Steps I have tried to fix the problem :
I tried clearing the cache only, but it didn’t work.

Thanks in advance for anyone trying to help me. :slight_smile:

It looks like migrations were not successful. Please check your migration status with:

php bin/console doctrine:migrations:status

You might want to make sure all migrations have been executed. As a side note: When you installing php dependencies make sure that script exit OK, a while ago during the migration to Mautic 4 I was not able to use contacts because dependencies have not been fully installed.

Regards, M.

hi

I upgraded from mautic 3 to 4.4.1 and it timed out due to my php settings (which i have now fixed)

but when i try to manually trigger the update now i get these errors

 -> ALTER TABLE `m3_lead_event_log` RENAME INDEX `IDX_SEARCH` TO `m3_IDX_SEARCH`

Migration 20201125155904 failed during Execution. Error An exception occurred while executing ‘ALTER TABLE m3_lead_event_log RENAME INDEX IDX_SEARCH TO m3_IDX_SEARCH’:

SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘INDEX IDX_SEARCH TO m3_IDX_SEARCH’ at line 1

In AbstractMySQLDriver.php line 98:

An exception occurred while executing ‘ALTER TABLE m3_lead_event_log RENAME INDEX IDX_SEARCH TO m3_IDX_SE ARCH’:

SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘INDEX IDX_SEARCH TO m3_I DX_SEARCH’ at line 1

In Exception.php line 18:

SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘INDEX IDX_SEARCH TO m3_I DX_SEARCH’ at line 1

In PDOConnection.php line 141:

SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘INDEX IDX_SEARCH TO m3_I DX_SEARCH’ at line 1

can someone please suggest a solution / next step? thank you

this is the error in the database
[2022-08-15 13:39:05] mautic.WARNING: Command doctrine:migrations:migrate exited with status code 1 {“hostname”:“(MASKED).com”,“pid”:31392}

and also when i run the status command, here is what i see

php bin/console doctrine:migration:status

== Configuration

>> Name:                                               Mautic Migrations
>> Database Driver:                                    pdo_mysql
>> Database Host:                                      localhost
>> Database Name:                                      user1234
>> Configuration Source:                               manually configured
>> Version Table Name:                                 m3_migrations
>> Version Column Name:                                version
>> Migrations Namespace:                               Mautic\Migrations
>> Migrations Directory:                               /home/(MASKED).com/user123/public_html/app/migrations
>> Previous Version:                                   2021-02-03 14:36:00 (20210203143600)
>> Current Version:                                    2021-02-23 17:47:02 (20210223174702)
>> Next Version:                                       2021-05-02 16:23:14 (20210502162314)
>> Latest Version:                                     2022-01-11 20:29:17 (20220111202917)
>> Executed Migrations:                                37
>> Executed Unavailable Migrations:                    0
>> Available Migrations:                               47
>> New Migrations:                                     10

I would try to restore mautic version 3 from backup and run the migration again. Migration process probably stuck somewhere in the middle so now there are all these errors. I would guess.

I restored back to version 3.3.5

but now when i try to run the update through CLI i get this error

[2022-08-15 14:50:24] mautic.NOTICE: Doctrine\DBAL\Exception\SyntaxErrorException: An exception occurred while executing ‘ALTER TABLE m3_lead_event_log RENAME INDEX IDX_SEARCH TO m3_IDX_SEARCH’: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘INDEX IDX_SEARCH TO m3_IDX_SEARCH’ at line 1 (uncaught exception) at /home/MASKED.com/MASKED/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 98 while running console command doctrine:migrations:migrate {“hostname”:“MASKED.com”,“pid”:19074}

this is the same problem i had when updating from the app on the web

any idea how to fix this?

If you did not have problems with migrations before and migrations failed only because of timeout, this leads me to believe that database has not been restored.

Second thing… if (I am mistaken) you did revert source AND database to a a previous version.
Look into migration that is failing and try to achieve manually what the migration script does. Also investigate the current database schema before you run anything.

Yeah when i restored it went back to the previous database and files, so everything is working now, but when i try to upgrade from cli i still get the same errors as above.

not sure how to resolve so ill keep using 3.3.5 for now

If you want I can look into it in scope of my paid services. Drop me a private message if you are up for it :).

You said you’re running MySQL version 7.4, but that’s php, not MySQL. This looks like you might be running a very old version my MySQL or MariaDB.

Either way, check your database version and the version of the database listed in your /app/config/local.php file.

Mautic may be trying to run a command that’s not available in your current version of MySQL or MariaDB.

I got MariaDB 10.2 is that too old?