Mautic Community Forums

Form Actions do not trigger

Hi,



I have a vanilla and blank installation of the latest Mautic software. I configured email settings properly (tested it) and created a lead form which I embedded on a Wordpress page. The lead form actions should tag the lead and send the form results to an email address.



When I display the form on the Wordpress page, fill it out and submit, the following happens:

  1. The submit button remains at “Please wait…”
  2. The lead is created according to the field values
  3. The lead is not tagged
  4. The lead form results are not sent to the email address



    It seems that the lead creation works fine, but the form actions are not triggered. Somehow the form “hangs”, this is what the “Please wait…” indicates. I tested again in the form preview - same (negative) result.



    Any ideas on how to debug this? Ich checked the log and the only maybe relevant error I can find is:
Code:
[2016-10-09 09:27:54] 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 #11. 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 /.../mautic/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php line 92

Any help is highly appreciated.

Peter

Hi,

I have a vanilla and blank installation of the latest Mautic software. I configured email settings properly (tested it) and created a lead form which I embedded on a Wordpress page. The lead form actions should tag the lead and send the form results to an email address.

When I display the form on the Wordpress page, fill it out and submit, the following happens:

  1. The submit button remains at “Please wait…”
  2. The lead is created according to the field values
  3. The lead is not tagged
  4. The lead form results are not sent to the email address

It seems that the lead creation works fine, but the form actions are not triggered. Somehow the form “hangs”, this is what the “Please wait…” indicates. I tested again in the form preview - same (negative) result.

Any ideas on how to debug this? Ich checked the log and the only maybe relevant error I can find is:

[2016-10-09 09:27:54] 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 #11. 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 /.../mautic/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php line 92

Any help is highly appreciated.

Peter

Update:

  • Clearing the cache did not change anything
  • Campaign email work as expected
  • I did not finde anything in the Apache-Log

I have the same problem. I think I did a quick & dirty? fix for this, in app/bundles/FormBundle/Entity/Submission.php, line #83 in function loadMetadata, add “->cascadePersist()”, so the call should look something like this:

builder->createManyToOne('form', 'Form') ->cascadePersist() ->inversedBy('submissions') ->addJoinColumn('form_id', 'id', false, false, 'CASCADE') ->build();

This error only happens on first submit (like if I clear all the cookies and then reload/submit), the second time I arrive on the page the form works because the entity was probably created before in the database.

I changed the code as you suggested - unfortunately the behaviour is the same. And on my instance the error happens all the time, not depending on if the submission is the first or the second one.

I’ve got the same issue, tried fixing like andreipop suggested, but no luck…

Sorry, but I have to push this issue. I installed Mautic as addition for a production environment. I received several feedback emails that users think, the registration did not work.

Thank you,
Peter

The same issue is also reported here: https://www.mautic.org/community/index.php/5779-2-2-0-form-submissions-hanging/0#p16294

This fixed it https://github.com/mautic/mautic/pull/2669

Indeed, it’s fixed. Thanks, Tony

I am having same issue after upgrading to v2.8.1 Any ideas?

Having same issue after installing a fresh copy of 2.9.0. Ideas or any progress here?

I have the same problem on a brand new Installation. I’m running Nginx/PHP7.0. The forms are submitted and the Contact added but the Redirect doesn’t happen.

In 2.9.0, this happens when you are logged into Mautic.
Use incognito browser for testing.

[quote=24568:@yalcin]In 2.9.0, this happens when you are logged into Mautic.
Use incognito browser for testing.[/quote]
That works in my case! Thank you!

I’m getting the same log error and 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