- Issue created by @ocastle
- Status changed to Needs review
4 months ago 10:16pm 2 August 2024 - π¬π§United Kingdom littlepixiez
Hi @ocastle. Could I just ask for the scenario that this is happening for you? On dev-2.x the form ID for me is correct for the form it is altering: "menu_link_content_menu_link_content_form".
Curious if I'm just missing something here! Thank you.
- π¬π§United Kingdom ocastle
Hi @littlepixiez, For me, I get dynamic form ids based on the current menu.
e.g. "menu_link_content_main_form" for main menu
or "menu_link_content_account_form" for the account menu.Changing the hook to use "menu_item_role_access_form_menu_link_content_form_alter" uses the base form id and resolves the issue for me.
In your testing does toggling the admin setting "Allow parents to override children" here: /admin/config/menu-item-role-access show/hide the 'Override children" setting on all the menus for you?
- π¬π§United Kingdom littlepixiez
Hi @ocastle. Ahh, I just found a similar issue here: https://www.drupal.org/project/menu_item_extras/issues/3043305 β
It looks like Menu Item Extras changes the form IDs - are you using this module? Menu Token have done a similar approach and changed the hook to the base ID: https://www.drupal.org/project/menu_token/issues/3113646 β
I'm happy your patch works and fixes it not working with Menu Item Extras installed also! Thanks very much. :)
- π¬π§United Kingdom ocastle
Yes, it just occurred to me that menu item extras might be doing something as we do have that installed as well.
Glad itβs working!
- Merge request !12#3465576 Updated the form alter hook to use the base form ID @ocastle β (Merged) created by littlepixiez
-
littlepixiez β
committed 0f47b2a6 on 8.x-2.x
Issue #3465576 by ocastle, littlepixiez: Override children setting...
-
littlepixiez β
committed 0f47b2a6 on 8.x-2.x
- Status changed to Fixed
3 months ago 9:38am 13 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.