Contact Record View (500 Error)

When trying to view any client record, I get a 500 error, and this in the log. Version: v2.2.1

Code:
[2016-10-19 08:37:30] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: "An exception occurred while executing 'SELECT ls.stage_id as reference, ls.event_name as eventName, ls.action_name as actionName, ls.date_added as dateAdded FROM lead_stages_change_log ls WHERE ls.lead_id = 7 ORDER BY ls.date_added DESC LIMIT 25': Unknown column 'ls.stage_id' in 'field list'" at /home/engageitnotifier/public_html/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 ls.stage_id as reference, ls.event_name as eventName, ls.action_name as actionName, ls.date_added as dateAdded FROM lead_stages_change_log ls WHERE ls.lead_id = 7 ORDER BY ls.date_added DESC LIMIT 25':nnUnknown column 'ls.stage_id' in 'field list' at /home/engageitnotifier/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): Unknown column 'ls.stage_id' in 'field list' at /home/engageitnotifier/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:94)"} []

When trying to view any client record, I get a 500 error, and this in the log. Version: v2.2.1

[2016-10-19 08:37:30] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: "An exception occurred while executing 'SELECT ls.stage_id as reference, ls.event_name as eventName, ls.action_name as actionName, ls.date_added as dateAdded FROM lead_stages_change_log ls WHERE ls.lead_id = 7 ORDER BY ls.date_added DESC LIMIT 25':  Unknown column 'ls.stage_id' in 'field list'" at /home/engageitnotifier/public_html/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 ls.stage_id as reference, ls.event_name as eventName, ls.action_name as actionName, ls.date_added as dateAdded FROM lead_stages_change_log ls WHERE ls.lead_id = 7 ORDER BY ls.date_added DESC LIMIT 25':nnUnknown column 'ls.stage_id' in 'field list' at /home/engageitnotifier/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): Unknown column 'ls.stage_id' in 'field list' at /home/engageitnotifier/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:94)"} []

Hi there, the system is complaining about a missing field … (ls.stage_id). It appears that when you upgraded, not all of the commands needed for the database update were not executed.

I wrote up a little ‘how to’ to run correct this… you can find the instructions here:

https://www.mautic.org/community/index.php/conversation/post/16500

Dan

Thanks Dan, I will give that a try.