After long a difficult migration some parts of mautic doesn't work

Your software
My Mautic version is: 4.4.1
My PHP version is: 8.0.21
My Database type and version is: pdo_mysql 8.0.28

Your problem
My problem is: Long way
I had a Mautic instance under 2.16.5 that I could not migrate as PHP params. I was in a hosting and with shared servers therefore the host did not allow me to change the max_execution-_time needed to perform the migration

A couple of days ago a took a VPS where I had install all the environments needed and PHP 7.3 as 2.16.5 does not run in more updated versions… Finally I have migrated to 3.3.1 as per mautic script and then to 3.3.5.
Then I had installed php 8.0.21 and migrated again to 4.4.1
Everything seems at first sight fine. I can logon. I can see mi contacts (finally). I can see my forms…
But when tried to enter in “segments” option nothing happens.
When tried to see the mails… is ok, but I can not edit them. when edit like segments nothing happens. If I try to create a new mail i can but when tried to save it then I receive an error

Uh oh! I think I broke it. If I do it again, please report me to the system administrator!

500 Internal Server Error

I think that is a problem with the database schema but when executed doctrine commands all of them show errors
Log is
[2022-08-03 16:06:59] mautic.ERROR: SCHEMA ERROR: An index with name ‘preferred_locale_search’ was already defined on table ‘leads’. {“hostname”:“vps-5156491b”,“pid”:44797}
[2022-08-03 16:08:13] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing ‘SELECT l0_.is_published AS is_published_0, l0_.date_added AS date_added_1, l0_.created_by AS created_by_2, l0_.created_by_user AS created_by_user_3, l0_.date_modified AS date_modified_4, l0_.modified_by AS modified_by_5, l0_.modified_by_user AS modified_by_user_6, l0_.checked_out AS checked_out_7, l0_.checked_out_by AS checked_out_by_8, l0_.checked_out_by_user AS checked_out_by_user_9, l0_.id AS id_10, l0_.name AS name_11, l0_.description AS description_12, l0_.alias AS alias_13, l0_.public_name AS public_name_14, l0_.filters AS filters_15, l0_.is_global AS is_global_16, l0_.is_preference_center AS is_preference_center_17, l0_.last_built_date AS last_built_date_18, l0_.category_id AS category_id_19 FROM lead_lists l0_ LEFT JOIN categories c1_ ON l0_.category_id = c1_.id ORDER BY l0_.name ASC’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0_.public_name’ in ‘field list’ (uncaught exception) at /var/www/lastanza.es/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 while running console command mautic:segments:update {“hostname”:“vps-5156491b”,“pid”:44801}
[2022-08-03 16:08:13] mautic.WARNING: Command mautic:segments:update exited with status code 1 {“hostname”:“vps-5156491b”,“pid”:44801}
[2022-08-03 16:12:02] mautic.ERROR: SCHEMA ERROR: An index with name ‘preferred_locale_search’ was already defined on table ‘leads’. {“hostname”:“vps-5156491b”,“pid”:44856}
[2022-08-03 16:12:13] mautic.WARNING: Command doctrine:schema:update exited with status code 1 {“hostname”:“vps-5156491b”,“pid”:44856}
[2022-08-03 16:36:26] mautic.ERROR: Cronfig: secret key is missing in the configuration {“hostname”:“vps-5156491b”,“pid”:44796}
[2022-08-03 18:54:02] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\InvalidFieldNameException: “An exception occurred while executing ‘SELECT t0.is_published AS is_published_1, t0.date_added AS date_added_2, t0.created_by AS created_by_3, t0.created_by_user AS created_by_user_4, t0.date_modified AS date_modified_5, t0.modified_by AS modified_by_6, t0.modified_by_user AS modified_by_user_7, t0.checked_out AS checked_out_8, t0.checked_out_by AS checked_out_by_9, t0.checked_out_by_user AS checked_out_by_user_10, t0.id AS id_11, t0.name AS name_12, t0.description AS description_13, t0.alias AS alias_14, t0.public_name AS public_name_15, t0.filters AS filters_16, t0.is_global AS is_global_17, t0.is_preference_center AS is_preference_center_18, t0.last_built_date AS last_built_date_19, t0.category_id AS category_id_20 FROM lead_lists t0 INNER JOIN email_list_xref ON t0.id = email_list_xref.leadlist_id WHERE email_list_xref.email_id = ?’ with params [224]: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘t0.public_name’ in ‘field list’” at /var/www/lastanza.es/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.is_published AS is_published_1, t0.date_added AS date_added_2, t0.created_by AS created_by_3, t0.created_by_user AS created_by_user_4, t0.date_modified AS date_modified_5, t0.modified_by AS modified_by_6, t0.modified_by_user AS modified_by_user_7, t0.checked_out AS checked_out_8, t0.checked_out_by AS checked_out_by_9, t0.checked_out_by_user AS checked_out_by_user_10, t0.id AS id_11, t0.name AS name_12, t0.description AS description_13, t0.alias AS alias_14, t0.public_name AS public_name_15, t0.filters AS filters_16, t0.is_global AS is_global_17, t0.is_preference_center AS is_preference_center_18, t0.last_built_date AS last_built_date_19, t0.category_id AS category_id_20 FROM lead_lists t0 INNER JOIN email_list_xref ON t0.id = email_list_xref.leadlist_id WHERE email_list_xref.email_id = ?’ with params [224]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘t0.public_name’ in ‘field list’ at /var/www/lastanza.es/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.public_name’ in ‘field list’ at /var/www/lastanza.es/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘t0.public_name’ in ‘field list’ at /var/www/lastanza.es/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117)”} {“hostname”:“vps-5156491b”,“pid”:44795}
[2022-08-03 18:55:21] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\InvalidFieldNameException: “An exception occurred while executing ‘SELECT l0_.is_published AS is_published_0, l0_.date_added AS date_added_1, l0_.created_by AS created_by_2, l0_.created_by_user AS created_by_user_3, l0_.date_modified AS date_modified_4, l0_.modified_by AS modified_by_5, l0_.modified_by_user AS modified_by_user_6, l0_.checked_out AS checked_out_7, l0_.checked_out_by AS checked_out_by_8, l0_.checked_out_by_user AS checked_out_by_user_9, l0_.id AS id_10, l0_.name AS name_11, l0_.description AS description_12, l0_.alias AS alias_13, l0_.public_name AS public_name_14, l0_.filters AS filters_15, l0_.is_global AS is_global_16, l0_.is_preference_center AS is_preference_center_17, l0_.last_built_date AS last_built_date_18, l0_.category_id AS category_id_19 FROM lead_lists l0_ LEFT JOIN categories c1_ ON l0_.category_id = c1_.id WHERE l0_.id IN (?) ORDER BY l0_.name ASC’ with params [77]: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0_.public_name’ in ‘field list’” at /var/www/lastanza.es/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 l0_.is_published AS is_published_0, l0_.date_added AS date_added_1, l0_.created_by AS created_by_2, l0_.created_by_user AS created_by_user_3, l0_.date_modified AS date_modified_4, l0_.modified_by AS modified_by_5, l0_.modified_by_user AS modified_by_user_6, l0_.checked_out AS checked_out_7, l0_.checked_out_by AS checked_out_by_8, l0_.checked_out_by_user AS checked_out_by_user_9, l0_.id AS id_10, l0_.name AS name_11, l0_.description AS description_12, l0_.alias AS alias_13, l0_.public_name AS public_name_14, l0_.filters AS filters_15, l0_.is_global AS is_global_16, l0_.is_preference_center AS is_preference_center_17, l0_.last_built_date AS last_built_date_18, l0_.category_id AS category_id_19 FROM lead_lists l0_ LEFT JOIN categories c1_ ON l0_.category_id = c1_.id WHERE l0_.id IN (?) ORDER BY l0_.name ASC’ with params [77]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0_.public_name’ in ‘field list’ at /var/www/lastanza.es/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 ‘l0_.public_name’ in ‘field list’ at /var/www/lastanza.es/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0_.public_name’ in ‘field list’ at /var/www/lastanza.es/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117)”} {“hostname”:“vps-5156491b”,“pid”:44796}

Can you plz try to regenerate the assets?

bin/console mautic:assets:generate

done and deleted cache… Nothing happened
[2022-08-03 18:29:28] mautic.ERROR: CAMPAIGN: An exception occurred while executing ‘SELECT t0.id AS id_1, t0.tag AS tag_2, t0.description AS description_3 FROM lead_tags t0 INNER JOIN lead_tags_xref ON t0.id = lead_tags_xref.tag_id WHERE lead_tags_xref.lead_id = ? ORDER BY t0.tag ASC’ with params [“7409”]: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘t0.description’ in ‘field list’ {“hostname”:“vps-5156491b”,“pid”:44796}
[2022-08-03 18:29:40] mautic.ERROR: CAMPAIGN: An exception occurred while executing ‘SELECT l0_.is_published AS is_published_0, l0_.date_added AS date_added_1, l0_.created_by AS created_by_2, l0_.created_by_user AS created_by_user_3, l0_.date_modified AS date_modified_4, l0_.modified_by AS modified_by_5, l0_.modified_by_user AS modified_by_user_6, l0_.checked_out AS checked_out_7, l0_.checked_out_by AS checked_out_by_8, l0_.checked_out_by_user AS checked_out_by_user_9, l0_.id AS id_10, l0_.name AS name_11, l0_.description AS description_12, l0_.alias AS alias_13, l0_.public_name AS public_name_14, l0_.filters AS filters_15, l0_.is_global AS is_global_16, l0_.is_preference_center AS is_preference_center_17, l0_.last_built_date AS last_built_date_18, l0_.category_id AS category_id_19 FROM lead_lists l0_ LEFT JOIN categories c1_ ON l0_.category_id = c1_.id WHERE l0_.id IN (?) ORDER BY l0_.name ASC’ with params [114]: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0_.public_name’ in ‘field list’ {“hostname”:“vps-5156491b”,“pid”:44796}
[2022-08-03 23:29:18] 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 l0_.is_published AS is_published_0, l0_.date_added AS date_added_1, l0_.created_by AS created_by_2, l0_.created_by_user AS created_by_user_3, l0_.date_modified AS date_modified_4, l0_.modified_by AS modified_by_5, l0_.modified_by_user AS modified_by_user_6, l0_.checked_out AS checked_out_7, l0_.checked_out_by AS checked_out_by_8, l0_.checked_out_by_user AS checked_out_by_user_9, l0_.id AS id_10, l0_.name AS name_11, l0_.description AS description_12, l0_.alias AS alias_13, l0_.public_name AS public_name_14, l0_.filters AS filters_15, l0_.is_global AS is_global_16, l0_.is_preference_center AS is_preference_center_17, l0_.last_built_date AS last_built_date_18 FROM lead_lists l0_ LEFT JOIN categories c1_ ON l0_.category_id = c1_.id ORDER BY l0_.date_modified DESC) dctrn_result) dctrn_table’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0_.public_name’ in ‘field list’" at /var/www/lastanza.es/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 COUNT() AS dctrn_count FROM (SELECT DISTINCT id_10 FROM (SELECT l0_.is_published AS is_published_0, l0_.date_added AS date_added_1, l0_.created_by AS created_by_2, l0_.created_by_user AS created_by_user_3, l0_.date_modified AS date_modified_4, l0_.modified_by AS modified_by_5, l0_.modified_by_user AS modified_by_user_6, l0_.checked_out AS checked_out_7, l0_.checked_out_by AS checked_out_by_8, l0_.checked_out_by_user AS checked_out_by_user_9, l0_.id AS id_10, l0_.name AS name_11, l0_.description AS description_12, l0_.alias AS alias_13, l0_.public_name AS public_name_14, l0_.filters AS filters_15, l0_.is_global AS is_global_16, l0_.is_preference_center AS is_preference_center_17, l0_.last_built_date AS last_built_date_18 FROM lead_lists l0_ LEFT JOIN categories c1_ ON l0_.category_id = c1_.id ORDER BY l0_.date_modified DESC) dctrn_result) dctrn_table’:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0_.public_name’ in ‘field list’ at /var/www/lastanza.es/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 ‘l0_.public_name’ in ‘field list’ at /var/www/lastanza.es/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0_.public_name’ in ‘field list’ at /var/www/lastanza.es/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:141)”} {“hostname”:“vps-5156491b”,“pid”:45244}
[2022-08-03 23:29:19] 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 l0_.is_published AS is_published_0, l0_.date_added AS date_added_1, l0_.created_by AS created_by_2, l0_.created_by_user AS created_by_user_3, l0_.date_modified AS date_modified_4, l0_.modified_by AS modified_by_5, l0_.modified_by_user AS modified_by_user_6, l0_.checked_out AS checked_out_7, l0_.checked_out_by AS checked_out_by_8, l0_.checked_out_by_user AS checked_out_by_user_9, l0_.id AS id_10, l0_.name AS name_11, l0_.description AS description_12, l0_.alias AS alias_13, l0_.public_name AS public_name_14, l0_.filters AS filters_15, l0_.is_global AS is_global_16, l0_.is_preference_center AS is_preference_center_17, l0_.last_built_date AS last_built_date_18 FROM lead_lists l0_ LEFT JOIN categories c1_ ON l0_.category_id = c1_.id ORDER BY l0_.date_modified DESC) dctrn_result) dctrn_table’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0_.public_name’ in ‘field list’" at /var/www/lastanza.es/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 COUNT() AS dctrn_count FROM (SELECT DISTINCT id_10 FROM (SELECT l0_.is_published AS is_published_0, l0_.date_added AS date_added_1, l0_.created_by AS created_by_2, l0_.created_by_user AS created_by_user_3, l0_.date_modified AS date_modified_4, l0_.modified_by AS modified_by_5, l0_.modified_by_user AS modified_by_user_6, l0_.checked_out AS checked_out_7, l0_.checked_out_by AS checked_out_by_8, l0_.checked_out_by_user AS checked_out_by_user_9, l0_.id AS id_10, l0_.name AS name_11, l0_.description AS description_12, l0_.alias AS alias_13, l0_.public_name AS public_name_14, l0_.filters AS filters_15, l0_.is_global AS is_global_16, l0_.is_preference_center AS is_preference_center_17, l0_.last_built_date AS last_built_date_18 FROM lead_lists l0_ LEFT JOIN categories c1_ ON l0_.category_id = c1_.id ORDER BY l0_.date_modified DESC) dctrn_result) dctrn_table’:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0_.public_name’ in ‘field list’ at /var/www/lastanza.es/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 ‘l0_.public_name’ in ‘field list’ at /var/www/lastanza.es/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0_.public_name’ in ‘field list’ at /var/www/lastanza.es/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:141)”} {“hostname”:“vps-5156491b”,“pid”:45245}

I think this is something common… the other day in the hosted instances I have migrated from 3.3.2 to 4.4.0 and I had to go back as the problem was the same… No access to Segments… and emails that can not be reviewed or saved new

I did it !
try to run below command.

And next, I have some sql error, and did it.
My mautic is running correctly.