Problem/Motivation

When investigating #3345151: Error when removing a menu 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

Issue fork redirect-3543679

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rodrigoaguilera created an issue. See original summary.

rodrigoaguilera’s picture

Status: Active » Needs review

Please review

rodrigoaguilera’s picture

Title: Move hook_entity_delete to hook_entity_predete » Move hook_entity_delete to hook_entity_predelete
tuwebo’s picture

I've just run into the related issue #3345151: Error when removing a menu, and this MR seems to be solving it. Thanks!

heddn’s picture

Status: Needs review » Reviewed & tested by the community

I think this makes sense. Once this lands, I'll commit #3345151: Error when removing a menu

berdir’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, merging.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

berdir’s picture

Status: Fixed » Reviewed & tested by the community

previous minor is currently broken everywhere, so I can't get this past the merge train and I don't have permission to disable merge trains. Waiting on versions change.

berdir’s picture

Status: Reviewed & tested by the community » Fixed

Merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.