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:
The submit button remains at “Please wait…”
The lead is created according to the field values
The lead is not tagged
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
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:
The submit button remains at “Please wait…”
The lead is created according to the field values
The lead is not tagged
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
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:
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.
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.
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.
[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)"} []