Form Problem after upgrade to 2.7.1

Just upgraded successfully from 2.5.1 to 2.7.1



However, I have also found that form redirect no longer works - although the form correctly submits the client information.



The redirect URL is set correctly and appears in the correct column in the database, but on submitting the form it goes to:

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

500 Internal Server Error’



log entry shows:

[2017-03-21 17:24:15] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: “An exception occurred while executing ‘SELECT t0.date_added AS date_added_1, t0.manually_removed AS manually_removed_2, t0.manually_added AS manually_added_3, t0.date_last_exited AS date_last_exited_4, t0.rotation AS rotation_5, t0.campaign_id AS campaign_id_6, t0.lead_id AS lead_id_7 FROM mauyu_campaign_leads t0 WHERE t0.lead_id = ? AND t0.campaign_id = ? LIMIT 1’ with params [514, 15]: Unknown column ‘t0.date_last_exited’ in ‘field list’” at /home/dd/public_html/mautic/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 t0.date_added AS date_added_1, t0.manually_removed AS manually_removed_2, t0.manually_added AS manually_added_3, t0.date_last_exited AS date_last_exited_4, t0.rotation AS rotation_5, t0.campaign_id AS campaign_id_6, t0.lead_id AS lead_id_7 FROM mauyu_campaign_leads t0 WHERE t0.lead_id = ? AND t0.campaign_id = ? LIMIT 1’ with params [514, 15]:nnUnknown column ‘t0.date_last_exited’ in ‘field list’ at /home/dd/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): Unknown column ‘t0.date_last_exited’ in ‘field list’ at /home/dd/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:94)"} []



Any thoughts appreciated.

Just upgraded successfully from 2.5.1 to 2.7.1

However, I have also found that form redirect no longer works - although the form correctly submits the client information.

The redirect URL is set correctly and appears in the correct column in the database, but on submitting the form it goes to:
‘Uh oh! I think I broke it. If I do it again, please report me to the system administrator!
500 Internal Server Error’

log entry shows:
[2017-03-21 17:24:15] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: “An exception occurred while executing ‘SELECT t0.date_added AS date_added_1, t0.manually_removed AS manually_removed_2, t0.manually_added AS manually_added_3, t0.date_last_exited AS date_last_exited_4, t0.rotation AS rotation_5, t0.campaign_id AS campaign_id_6, t0.lead_id AS lead_id_7 FROM mauyu_campaign_leads t0 WHERE t0.lead_id = ? AND t0.campaign_id = ? LIMIT 1’ with params [514, 15]: Unknown column ‘t0.date_last_exited’ in ‘field list’” at /home/dd/public_html/mautic/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 t0.date_added AS date_added_1, t0.manually_removed AS manually_removed_2, t0.manually_added AS manually_added_3, t0.date_last_exited AS date_last_exited_4, t0.rotation AS rotation_5, t0.campaign_id AS campaign_id_6, t0.lead_id AS lead_id_7 FROM mauyu_campaign_leads t0 WHERE t0.lead_id = ? AND t0.campaign_id = ? LIMIT 1’ with params [514, 15]:nnUnknown column ‘t0.date_last_exited’ in ‘field list’ at /home/dd/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): Unknown column ‘t0.date_last_exited’ in ‘field list’ at /home/dd/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:94)"} []

Any thoughts appreciated.

Contact to your host for some PHP extenstion.

Thanks again for the help.
There appears to be a missing column and schema update will not insert it:

dd@s38b [~/public_html/mautic]# php app/console doctrine:schema:update --dump-sql

[DoctrineDBALSchemaSchemaException]
There is no column with name ‘id’ on table ‘mauyu_campaign_lead_event_log’.

doctrine:schema:update [–complete] [–dump-sql] [-f|–force] [–em [EM]] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env ENV] [–no-debug] [–]

dd@s38b [~/public_html/mautic]# php app/console doctrine:schema:update --force

[DoctrineDBALSchemaSchemaException]
There is no column with name ‘id’ on table ‘mauyu_campaign_lead_event_log’.

doctrine:schema:update [–complete] [–dump-sql] [-f|–force] [–em [EM]] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env ENV] [–no-debug] [–]

How do I proceed?

Yes it is- the link proveded to uodate at the top if the mautic dashbiard. Oruginally installed by Softalacious. I am beginning to realise that this may nit be a good idea. You think you are doing the right thing by using these processes but often not so.

@waverider, it is easy enough (if you’ve SSH access) to do the upgrades via the command line. Might be best to go down that path if you can in future.

I certainly will be doing that. However, I now have to create that missing column. Can someone please give me the correct code?

Does anyone have a column ‘id’ on table ’ ****_campaign_lead_event_log’? There are a number of _id columns ( event_id, lead_id, campaign_id, ip_id, channel_id) but no ‘id’.
If not why would it throw the error:
[DoctrineDBALSchemaSchemaException]
There is no column with name ‘id’ on table ‘mauyu_campaign_lead_event_log’.

I decided to create another instance of Mautic and compare the sql code for the table. There are distinct differences - not sure why, and should I drop the table and replace it???

Current problem database :

CREATE TABLE IF NOT EXISTS `mauyu_campaign_lead_event_log` ( `event_id` int(11) NOT NULL, `lead_id` int(11) NOT NULL,
New 2.7.1

CREATE TABLE IF NOT EXISTS `mau9u_campaign_lead_event_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `event_id` int(11) NOT NULL, `lead_id` int(11) NOT NULL,

Current problem database :

`non_action_path_taken` tinyint(1) DEFAULT NULL, PRIMARY KEY (`event_id`,`lead_id`), KEY `IDX_B7420BA171F7E88B` (`event_id`),

New 2.7.1

`non_action_path_taken` tinyint(1) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `mau9u_campaign_rotation` (`event_id`,`lead_id`,`rotation`), KEY `IDX_7BF8FB7D71F7E88B` (`event_id`),

All problems now resolved - missing Columns and Keys causing the problem. How it happened? - no idea. Fixed by using clean install and comparing databases then altering tables to correct form. schema update then worked.
Will only update using command line in future - lesson learnt.

Thanks for the advice - much appreciated. This is my first instance of Mautic so i have a lot to learn :slight_smile: