Mautic Community Forums

Forms Down After 2.9 Update

I’ve updated and now my forms have 2 buttons. I couldn’t figure it out, so I toasted Mautic after exporting contacts, and reinstalled clean. Added new forms, customized the normal submit button to say something else, saved the form. Go back in, two submit buttons - can’t delete either of them. If I test the form, it throws a mautic page error. The contact IS saved, but not added to the segment as the form is supposed to do.



I’m on Ubunut 16.04 LTS / nginx / PHP 7



I have another site on the same server with mautic and I haven’t updated them. That site’s forms are fine. I’m dead in the water - is there a way to get the old release? I can reinstall - this particular installation isn’t heavily customized yet.



Also – checked the log:

Quote:
[2017-07-14 01:10:47] mautic.CRITICAL: Uncaught PHP Exception DoctrineORMORMInvalidArgumentException: "A new entity was found through the relationship 'MauticFormBundleEntitySubmission#lead' that was not configured to cascade persist operations for entity: MauticLeadBundleEntityLead with ID #. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"})." at /var/www/theatereleven.com/public_html/content/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php line 92 {"exception":"[object] (Doctrine\ORM\ORMInvalidArgumentException(code: 0): A new entity was found through the relationship 'Mautic\FormBundle\Entity\Submission#lead' that was not configured to cascade persist operations for entity: Mautic\LeadBundle\Entity\Lead with ID #. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}). at /var/www/theatereleven.com/public_html/content/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php:92)"} []


Thank you!!!!

I’ve updated and now my forms have 2 buttons. I couldn’t figure it out, so I toasted Mautic after exporting contacts, and reinstalled clean. Added new forms, customized the normal submit button to say something else, saved the form. Go back in, two submit buttons - can’t delete either of them. If I test the form, it throws a mautic page error. The contact IS saved, but not added to the segment as the form is supposed to do.

I’m on Ubunut 16.04 LTS / nginx / PHP 7

I have another site on the same server with mautic and I haven’t updated them. That site’s forms are fine. I’m dead in the water - is there a way to get the old release? I can reinstall - this particular installation isn’t heavily customized yet.

Also – checked the log:

Thank you!!!

Same.
Forms not submitting anymore. Get a 500 error in the console.
Mautic Log has this error:

[2017-07-17 12:10:27] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: "An exception occurred while executing 'UPDATE leads SET affinity_tiered = ?, enrollment_term_year = ?, academicareaofinterest = ?, startdate = ?, lifecyclestage = ?, chosenpersonalizedvisitda = ?, pushed_to_hobsons_radius = ?, attribution_date = ? WHERE id = ?' with params ["Art", "2018 Fall", "undecided", 53, 54, "2017-03-15 10:00:00", "0", null, 168143]:  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'startdate' in 'field list'" at /path/to/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 'UPDATE leads SET affinity_tiered = ?, enrollment_term_year = ?, academicareaofinterest = ?, startdate = ?, lifecyclestage = ?, chosenpersonalizedvisitda = ?, pushed_to_hobsons_radius = ?, attribution_date = ? WHERE id = ?' with params ["Art", "2018 Fall", "undecided", 53, 54, "2017-03-15 10:00:00", "0", null, 168143]:nnSQLSTATE[42S22]: Column not found: 1054 Unknown column 'startdate' in 'field list' at /path/to/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'startdate' in 'field list' at /path/to/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:93, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'startdate' in 'field list' at /path/to/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91)"} []


[2017-07-17 12:10:57] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionInvalidFieldNameException: "An exception occurred while executing 'UPDATE leads SET startdate = ?, lifecyclestage = ?, chosenpersonalizedvisitda = ?, pushed_to_hobsons_radius = ?, attribution_date = ? WHERE id = ?' with params [53, 54, "2017-03-15 10:00:00", "0", null, 168144]:  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'startdate' in 'field list'" at /path/to/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 'UPDATE leads SET startdate = ?, lifecyclestage = ?, chosenpersonalizedvisitda = ?, pushed_to_hobsons_radius = ?, attribution_date = ? WHERE id = ?' with params [53, 54, "2017-03-15 10:00:00", "0", null, 168144]:nnSQLSTATE[42S22]: Column not found: 1054 Unknown column 'startdate' in 'field list' at /path/to/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'startdate' in 'field list' at /path/to/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:93, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'startdate' in 'field list' at /path/to/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91)"} []

We are receiving the same issue with the command line update. We attempted to resolve this by re-uploading the complete package but this caused more problems. We had to revert back to what we were running. Hopefully, this will be resolved in the next release.

Yes, I’m having to revert back to 2.8.2.
Not fun. Nor confidence inspiring…

In case someone else finds they need to downgrade back to 2.8.2, I found this tut very useful.
Downgrade worked fine. Just be sure to have a backup of the files it mentions. SSH method is hours faster.
Downgrade to 2.8.2

A fix is ready in 2.9.1: https://github.com/mautic/mautic/pull/4423

If you can’t wait for this update, you could change it yourself via ftp:

  1. open the file app/bundles/FormBundle/Controller/FormController.php

  2. change row 718 from:

if ($formField->getAlias() == 'submit' && $formField->getType() == 'button') {

to:

if ($formField->getType() == 'button') {

@GoGo I did that …same issue already exist… I think its something related to Entities. Is it like that?

I did downgrade option this link
https://autoize.com/downgrade-mautic/

It seems not working and always say:

“The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.
System administrators, check server logs for errors.”

I resolved that by work around … it might help anyone
in this file
app/bundles/CoreBundle/Entity/CommonRepository.php
you can your saveEntity function by below:

 public function saveEntity($entity, $flush = true)
    {
        $this->getEntityManager()->persist($entity);
        
        if(get_class($entity) == "MauticFormBundleEntitySubmission"){    
 $this->getEntityManager()->persist($entity->getLead());
}
        if ($flush) {
            $this->getEntityManager()->flush($entity);
        }
    }

The manual fix provided didn’t fix my form. Still two buttons. Guess I’m going back a version - need my forms working right.

Fixed in Mautic 2.9.1

I’m getting the same log error but the problem is slightly different, the form is hang on submit button after hit submit. Here is the log: [2017-07-29 00:24:05] mautic.CRITICAL: Uncaught PHP Exception DoctrineORMORMInvalidArgumentException: “A new entity was found through the relationship ‘MauticEmailBundleEntityStatDevice#stat’ that was not configured to cascade persist operations for entity: MauticEmailBundleEntityStat@0000000052ca741c00000000025c21fc. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(…,cascade={“persist”}). If you cannot find out which entity causes the problem implement ‘MauticEmailBundleEntityStat#__toString()’ to get a clue.” at /home/go.firetoeic.com/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php line 92 {“exception”:"[object] (Doctrine\ORM\ORMInvalidArgumentException(code: 0): A new entity was found through the relationship ‘Mautic\EmailBundle\Entity\StatDevice#stat’ that was not configured to cascade persist operations for entity: Mautic\EmailBundle\Entity\Stat@0000000052ca741c00000000025c21fc. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(…,cascade={“persist”}). If you cannot find out which entity causes the problem implement ‘Mautic\EmailBundle\Entity\Stat#__toString()’ to get a clue. at /home/go.firetoeic.com/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php:92)"} []

you can test the form here: https://go.firetoeic.com/form/20

What is your Mautic version?

ver 2.9.1

Please report that issue with steps to replicate to https://github.com/mautic/mautic/issues