New Version 3.0.6 accidentally deletes menu links

Created on 8 August 2025, 23 days ago

Problem/Motivation

GroupContentMenuHooks::entityPredelete, introduced in 3.0.6, carries a highly dangerous code which could delete all (!) menu links. This method runs for every entity being deleted and doesn't check if the deleted entity is an entity of GroupContentMenu, before calling deleteLinksInMenu. It builds the menu_name to delete from out the MENU_PREFIX string which is group_menu_link_content- and the entity id --- this means: when i delete node 12 or media 12 or whatever and unfortunately have a menu with the menu_name "group_menu_link_content-12" --- these links would be deleted, although i never meant to do this. In my case, as i have an update script which deletes hundreds of entities of node type X, my menus are completely empty.

Flagging this as "critical", as i cannot think of any lower priority for this.

Steps to reproduce

Update to 3.0.6 and delete any entity which has the same id as an existing GroupContentMenu entity --- the links of this menu will get deleted.

Proposed resolution

Check for GroupContentMenuInterface prior to call deleteLinksInMenu.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇩🇪Germany drupatz

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024