# Not able to delete an action

**URL:** <https://forum.mautic.org/t/not-able-to-delete-an-action/3264>\
**Category:** Product Support\
**Created:** [January 20, 2016, 12:14am UTC](https://forum.mautic.org/t/not-able-to-delete-an-action/3264 "2016-01-20T00:14:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![doud](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@doud](https://forum.mautic.org/u/doud)\
**Post date:** [January 20, 2016, 12:14am UTC](https://forum.mautic.org/t/not-able-to-delete-an-action/3264/1 "2016-01-20T00:14:01Z")

</div>

Hi everyone,  
  
  
  
I have a small problems with my forms actions. I am not able to delete my actions! This is really weird. From what I have tried, I am able to delete everything else.  
  
Things I have tried:

- Update composer.lock  
- Try another browser  
- Try private browsing  
- Restart server  
- Clear cache  
- Create another form  
  
  
  
When I try to delete, I click on the red cross on the action row. The all row becomes red. I apply, save & close (I guess only one of each should be enough), come back to my form actions, and the deleted actions is still here. The only thing that changed is that it went at the end of the actions list.  
  
  
  
I don’t really know where to look for now.  
  
  
  
Thanks for your help!  
  
  
  
Ed  
  
  
  
EDIT:  
  
New discovery: when I check my DB, here is what happens in the actions table. When I click on ‘delete’, then ‘apply’, it looks like it delete the actions, and then create a new one with a new ID.

---

<div class="post-metadata">

**Author:** ![doud](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@doud](https://forum.mautic.org/u/doud)\
**Post date:** [January 20, 2016, 12:14am UTC](https://forum.mautic.org/t/not-able-to-delete-an-action/3264/2 "2016-01-20T00:14:01Z")

</div>

Hi everyone,

I have a small problems with my forms actions. I am not able to delete my actions! This is really weird. From what I have tried, I am able to delete everything else.  
Things I have tried:

- Update composer.lock
- Try another browser
- Try private browsing
- Restart server
- Clear cache
- Create another form

When I try to delete, I click on the red cross on the action row. The all row becomes red. I apply, save & close (I guess only one of each should be enough), come back to my form actions, and the deleted actions is still here. The only thing that changed is that it went at the end of the actions list.

I don’t really know where to look for now.

Thanks for your help!

Ed

EDIT:  
New discovery: when I check my DB, here is what happens in the actions table. When I click on ‘delete’, then ‘apply’, it looks like it delete the actions, and then create a new one with a new ID.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 20, 2016, 11:17am UTC](https://forum.mautic.org/t/not-able-to-delete-an-action/3264/3 "2016-01-20T11:17:32Z")

</div>

I’m not able to replicate this issue.

Just a note, when you say you’ve updated the composer.lock, you should use the `composer install` command only to update the PHP libraries. `composer update` can screw up many things.

---

<div class="post-metadata">

**Author:** ![doud](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@doud](https://forum.mautic.org/u/doud)\
**Post date:** [January 20, 2016, 2:11pm UTC](https://forum.mautic.org/t/not-able-to-delete-an-action/3264/4 "2016-01-20T14:11:12Z")

</div>

This is actually what I did in the beginning. Didn’t work either.

When I look at the XMR here is what I have when press the delete button:

```auto
XHR finished loading: POST "http://my-mautic.com/s/forms/action/delete/25?formId=2&mauticUserLastActive=1&mauticLastNotificationId=117".
```

Seems to sends the right request (25 is the good ID).

But I don’t know where else to look for errors (didn’t find anything in php and sql logs).

---

<div class="post-metadata">

**Author:** ![pietromantovani](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@pietromantovani](https://forum.mautic.org/u/pietromantovani)\
**Post date:** [January 21, 2016, 8:45am UTC](https://forum.mautic.org/t/not-able-to-delete-an-action/3264/5 "2016-01-21T08:45:54Z")

</div>

I think I have a similar issue, after updating to 1.2.3., when I try to modify something in the builder (fore example “Set Action Timing” in Send Email) and save, if I go back to the builder the change is not saved.

---

<div class="post-metadata">

**Author:** ![pietromantovani](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@pietromantovani](https://forum.mautic.org/u/pietromantovani)\
**Post date:** [January 21, 2016, 8:54am UTC](https://forum.mautic.org/t/not-able-to-delete-an-action/3264/6 "2016-01-21T08:54:23Z")

</div>

@escopecz could you please have a look here if you have any suggestion?

[2016-01-21 08:40:05] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALDBALException: “An exception occurred while executing ‘DELETE FROM campaign\_events WHERE id = ?’ with params [12]: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`cancelli_preventivo`.`campaign_events`, CONSTRAINT `FK_8EC42EE7727ACA70` FOREIGN KEY (`parent_id`) REFERENCES `campaign_events` (`id`))” at /var/www/vhosts/MYDOMAIN/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 {“exception”:"[object] (Doctrine\DBAL\DBALException(code: 0): An exception occurred while executing ‘DELETE FROM campaign\_events WHERE id = ?’ with params [12]:nnSQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`cancelli_preventivo`.`campaign_events`, CONSTRAINT `FK_8EC42EE7727ACA70` FOREIGN KEY (`parent_id`) REFERENCES `campaign_events` (`id`)) at /var/www/vhosts/MYDOMAIN/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:91, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`cancelli_preventivo`.`campaign_events`, CONSTRAINT `FK_8EC42EE7727ACA70` FOREIGN KEY (`parent_id`) REFERENCES `campaign_events` (`id`)) at /var/www/vhosts/MYDOMAIN/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:855)"} []

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 21, 2016, 9:01am UTC](https://forum.mautic.org/t/not-able-to-delete-an-action/3264/7 "2016-01-21T09:01:56Z")

</div>

@pietromantovani seems to me like this:

[https://github.com/mautic/mautic/pull/1284](https://github.com/mautic/mautic/pull/1284)

It will be fixed in 1.2.4, but feel free to test that to be sure it is the same problem.

Do you by chance know what action triggered the SQL delete errors?

---

<div class="post-metadata">

**Author:** ![pietromantovani](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@pietromantovani](https://forum.mautic.org/u/pietromantovani)\
**Post date:** [January 21, 2016, 9:11am UTC](https://forum.mautic.org/t/not-able-to-delete-an-action/3264/8 "2016-01-21T09:11:38Z")

</div>

@escopecz the error came out when I try to edit an existing campaign, I change “Set Action Timing” in Send Email and save, if I go back to the builder the change is not saved and I get the error.  
I’ve found a (funny) workaround: if I need to edit a campaign, I add something (it is not important what) in the campaign and immediately delete it (without saving) and then I do the change that I need and finally I save.  
Actually looks like the issue you’ve reported.
