Mautic Community Forums

Not able to delete an action

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.

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.

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.

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:

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).

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.

@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)"} []

@pietromantovani seems to me like this:

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?

@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.