Forms,logo etc not loading

Your software
My Mautic version is: 2
My PHP version is:PHP Version 5.6.40
My Database type and version is:mysql

Your problem
My problem is: My mautic was working fine few days back but suddenly I started seeing strange error when I was loading the mautic. I solved that error using clearing cache directly, but after that when I load the forms section I am seeing 500 error like below

Also, all whitelabel images/logo are gone.

These errors are shown in the log:

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 f0_.is_pu
blished AS is_published_0, f0_.date_added AS date_added_1, f0_.created_by AS created_by_2, f0_.created_by_user AS cre
ated_by_user_3, f0_.date_modified AS date_modified_4, f0_.modified_by AS modified_by_5, f0_.modified_by_user AS modif
ied_by_user_6, f0_.checked_out AS checked_out_7, f0_.checked_out_by AS checked_out_by_8, f0_.checked_out_by_user AS c
hecked_out_by_user_9, f0_.id AS id_10, f0_.name AS name_11, f0_.description AS description_12, f0_.alias AS alias_13,
f0_.form_attr AS form_attr_14, f0_.cached_html AS cached_html_15, f0_.post_action AS post_action_16, f0_.post_action
property AS post_action_property_17, f0.publish_up AS publish_up_18, f0_.publish_down AS publish_down_19, f0_.templ
ate AS template_20, f0_.in_kiosk_mode AS in_kiosk_mode_21, f0_.render_style AS render_style_22, f0_.form_type AS form
type_23, f0.no_index AS no_index_24, (SELECT count(f1_.id) AS dctrn__1 FROM form_submissions f1_ WHERE f1_.form_id
= f0_.id) AS sclr_25 FROM forms f0_ LEFT JOIN categories c2_ ON f0_.category_id = c2_.id ORDER BY f0_.name ASC) dctrn
result) dctrn_table’: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'f0.form_attr’ in ‘field list’" at /v
ar/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 {“exception”:"[objec
t] (Doctrine\DBAL\Exception\InvalidFieldNameException(code: 0): An exception occurred while executing 'SELECT COUN
T(
) AS dctrn_count FROM (SELECT DISTINCT id_10 FROM (SELECT f0_.is_published AS is_published_0, f0_.date_added AS da
te_added_1, f0_.created_by AS created_by_2, f0_.created_by_user AS created_by_user_3, f0_.date_modified AS date_modif
ied_4, f0_.modified_by AS modified_by_5, f0_.modified_by_user AS modified_by_user_6, f0_.checked_out AS checked_out_7
, f0_.checked_out_by AS checked_out_by_8, f0_.checked_out_by_user AS checked_out_by_user_9, f0_.id AS id_10, f0_.name
AS name_11, f0_.description AS description_12, f0_.alias AS alias_13, f0_.form_attr AS form_attr_14, f0_.cached_html
AS cached_html_15, f0_.post_action AS post_action_16, f0_.post_action_property AS post_action_property_17, f0_.publi
sh_up AS publish_up_18, f0_.publish_down AS publish_down_19, f0_.template AS template_20, f0_.in_kiosk_mode AS in_kio
sk_mode_21, f0_.render_style AS render_style_22, f0_.form_type AS form_type_23, f0_.no_index AS no_index_24, (SELECT
count(f1_.id) AS dctrn__1 FROM form_submissions f1_ WHERE f1_.form_id = f0_.id) AS sclr_25 FROM forms f0_ LEFT JOIN c
ategories c2_ ON f0_.category_id = c2_.id ORDER BY f0_.name ASC) dctrn_result) dctrn_table’:\n\nSQLSTATE[42S22]: Colu
mn not found: 1054 Unknown column ‘f0_.form_attr’ in ‘field list’ at /var/www/html/mautic/vendor/doctrine/dbal/lib/Do
ctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Co
lumn not found: 1054 Unknown column ‘f0_.form_attr’ in ‘field list’ at /var/www/html/mautic/vendor/doctrine/dbal/lib/
Doctrine/DBAL/Driver/PDOConnection.php:106, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknow
n column ‘f0_.form_attr’ in ‘field list’ at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOCon
nection.php:104)”}

Preformatted text

`

Steps I have tried to fix the problem:

Any thoughts @mauticdevuser @autoize ?

Hey there, Mautic 2 hasn’t been supported for 2+ years, so you will probably struggle!

It looks like there are some DB columns missing according to the error.

As to why it happened out of the blue, usually this comes down to issues with your hosting.

  • PHP updates
  • MySQL updates
  • File/folder ownership issues

I would check those as a starting point.

Thanks @rcheesley for the quick revert.

I don’t think we have updated anything recently, any way to solve this? Any script to update MySQL schema? Also where can I get better tech support to solve this?

I would suggest you look at finding a freelancer to help you troubleshoot this problem - and then update you to Mautic 4.

There haven’t been any updates for Mautic 2 for a very long time and you are probably therefore running a vulnerable version, and at best, missing out on a bunch of features!