# Dynamic Content Causing Error 500

**URL:** <https://forum.mautic.org/t/dynamic-content-causing-error-500/10744>\
**Category:** Product Support\
**Created:** [September 14, 2018, 7:38am UTC](https://forum.mautic.org/t/dynamic-content-causing-error-500/10744 "2018-09-14T07:38:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cyanstar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cyanstar/32/53_2.png) [@Cyanstar](https://forum.mautic.org/u/Cyanstar)\
**Post date:** [September 14, 2018, 7:38am UTC](https://forum.mautic.org/t/dynamic-content-causing-error-500/10744/1 "2018-09-14T07:38:52Z")

</div>

Hi guys,

Not sure if I’m being really dumb, with how I’ve set up my dynamic content, or if I have some form of error in my installation. Whenever I add dynamic content to a page, it spits out the 500 error for none admin users. I’ve had a look at the error code it gives me, but it’s above my level of knowledge.

Error log:

[2018-09-14 12:16:32] mautic.CRITICAL: Uncaught PHP Exception DoctrineORMORMInvalidArgumentException: “A new entity was found through the relationship ‘MauticDynamicContentBundleEntityStat#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 /opt/bitnami/apps/mautic/htdocs/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\DynamicContentBundle\Entity\Stat#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 /opt/bitnami/apps/mautic/htdocs/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php:92)”} []

Kind regards,  
Nate C.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 17, 2019, 4:33pm UTC](https://forum.mautic.org/t/dynamic-content-causing-error-500/10744/2 "2019-10-17T16:33:14Z")

</div>


