Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When advanced action is deleted first, trigger cannot unassign. Please confirm it.
steps:
- create own advanced action at admin/settings/actions
- assign trigger to created action at admin/build/trigger/node
- delete that action at admin/settings/actions
Comment | File | Size | Author |
---|---|---|---|
#4 | trigger-remove.patch | 699 bytes | Gábor Hojtsy |
#2 | Screenshot_2.png | 8.42 KB | Gábor Hojtsy |
#2 | Screenshot_3.png | 16.1 KB | Gábor Hojtsy |
Comments
Comment #1
Takafumi CreditAttribution: Takafumi commentedEncounters WSOD at triggered event when orphaned trigger remains. For this reason, this issue is critical.
Comment #2
Gábor HojtsyI can reproduce this issue. The problem is that when you remove an advanced action, it is not deassigned first from all triggers. This results in these interesting admin and delete confirm pages as attached.
Comment #3
Gábor HojtsyWhy does this happen?
- When you delete an action, system_actions_delete_form_submit() is invoked.
- This invokes actions_delete($aid), which deletes the action.
- actions_delete($aid) also does a module_invoke_all('actions_delete', $aid); call, which is supposed to be used by modules to react on the deletion
- trigger module does not implement this hook, but it should implement it to remove all trigger associations for this action as well
That's our problem.
Comment #4
Gábor HojtsyPatch cooked, tested, works for me.
Comment #5
Gábor HojtsyNote that aid is a varchar column, so we need to use this string check. It is not a usual integer ID.
Comment #6
Takafumi CreditAttribution: Takafumi commentedGreat, a patch works properly.
Comment #7
Gábor HojtsyCommitted, thanks for testing.
Comment #8
Takafumi CreditAttribution: Takafumi commentedthanks.