Move hook_entity_delete to hook_entity_predete

Created on 28 August 2025, about 8 hours ago

Problem/Motivation

When investigating 🐛 Error when removing a menu Needs work I realized it is a complex juggling of pieces.
Redirect tries to generate a canonical URL for an entity that requires something that was delete in predelete step for that same entity.

Steps to reproduce

Install redirect 8.x-1.11 and group_content_menu. Configure it and try to delete a menu that belongs to a group

Proposed resolution

Ideally the redirect module shouldn't be bothered for the bugs of other modules but I think the logic here is not 100% correct since the redirects should be deleted before the entity and other hook_entity_delete that might happen.

Remaining tasks

Code the change

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain rodrigoaguilera Barcelona

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024