# Saving edited campaing error

**URL:** <https://forum.mautic.org/t/saving-edited-campaing-error/3606>\
**Category:** Product Support\
**Created:** [April 27, 2016, 9:12am UTC](https://forum.mautic.org/t/saving-edited-campaing-error/3606 "2016-04-27T09:12:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Salvofan](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@Salvofan](https://forum.mautic.org/u/Salvofan)\
**Post date:** [April 27, 2016, 9:12am UTC](https://forum.mautic.org/t/saving-edited-campaing-error/3606/1 "2016-04-27T09:12:17Z")

</div>

Hi,  
  
I have a pretty bad error that happens sometimes. When a user (not admin) edit a campaign sometimes he gets this error and all events that have been deleted are still there (in upper left corner when opening the builder again).  
  
In the log I have this error:  
  
[2016-04-27 10:01:57] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALDBALException: “An exception occurred while executing ‘DELETE FROM mauqo\_campaign\_events WHERE id = ?’ with params [262]: Cannot delete or update a parent row: a foreign key constraint fails (`maut812`.`mauqo_campaign_events`, CONSTRAINT `FK_25BBE925727ACA70` FOREIGN KEY (`parent_id`) REFERENCES `mauqo_campaign_events` (`id`))” at /PATH-TO-MAUTIC/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 {“exception”:"[object] (Doctrine\DBAL\DBALException(code: 0): An exception occurred while executing ‘DELETE FROM mauqo\_campaign\_events WHERE id = ?’ with params [262]:nnCannot delete or update a parent row: a foreign key constraint fails (`maut812`.`mauqo_campaign_events`, CONSTRAINT `FK_25BBE925727ACA70` FOREIGN KEY (`parent_id`) REFERENCES `mauqo_campaign_events` (`id`)) at /PATH-TO-MAUTIC/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:91, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 1451): Cannot delete or update a parent row: a foreign key constraint fails (`maut812`.`mauqo_campaign_events`, CONSTRAINT `FK_25BBE925727ACA70` FOREIGN KEY (`parent_id`) REFERENCES `mauqo_campaign_events` (`id`)) at /PATH-TO-MAUTIC/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:166)"} []  
  
  
  
Would you have any idea/advice? Server is Ubuntu LTS, with Apache/MySQL  
  
  
  
Thanks in advance,  
  
Salvatore.

---

<div class="post-metadata">

**Author:** ![Salvofan](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@Salvofan](https://forum.mautic.org/u/Salvofan)\
**Post date:** [April 27, 2016, 9:12am UTC](https://forum.mautic.org/t/saving-edited-campaing-error/3606/2 "2016-04-27T09:12:17Z")

</div>

Hi,  
I have a pretty bad error that happens sometimes. When a user (not admin) edit a campaign sometimes he gets this error and all events that have been deleted are still there (in upper left corner when opening the builder again).  
In the log I have this error:  
[2016-04-27 10:01:57] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALDBALException: “An exception occurred while executing ‘DELETE FROM mauqo\_campaign\_events WHERE id = ?’ with params [262]: Cannot delete or update a parent row: a foreign key constraint fails (`maut812`.`mauqo_campaign_events`, CONSTRAINT `FK_25BBE925727ACA70` FOREIGN KEY (`parent_id`) REFERENCES `mauqo_campaign_events` (`id`))” at /PATH-TO-MAUTIC/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 {“exception”:"[object] (Doctrine\DBAL\DBALException(code: 0): An exception occurred while executing ‘DELETE FROM mauqo\_campaign\_events WHERE id = ?’ with params [262]:nnCannot delete or update a parent row: a foreign key constraint fails (`maut812`.`mauqo_campaign_events`, CONSTRAINT `FK_25BBE925727ACA70` FOREIGN KEY (`parent_id`) REFERENCES `mauqo_campaign_events` (`id`)) at /PATH-TO-MAUTIC/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:91, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 1451): Cannot delete or update a parent row: a foreign key constraint fails (`maut812`.`mauqo_campaign_events`, CONSTRAINT `FK_25BBE925727ACA70` FOREIGN KEY (`parent_id`) REFERENCES `mauqo_campaign_events` (`id`)) at /PATH-TO-MAUTIC/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:166)"} []

Would you have any idea/advice? Server is Ubuntu LTS, with Apache/MySQL

Thanks in advance,  
Salvatore.
