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.
Follow-up to #2285413-13: [Meta] Standardize entity route names
Problem/Motivation
\Drupal\menu_link_content\Form\MenuLinkContentDeleteForm::getCancelUrl()
point to menu ui route but dependency is wrong
Menu
entity defined in system module but uses admin permission defined in menu_ui module
Proposed resolution
move permission definition to system module
add check to MenuLinkContentDeleteForm::getCancelUrl()
to make sure menu_ui module enabled
Remaining tasks
commit
User interface changes
no
API changes
No, except permission administer menu
moved to system module so BC is fine
Beta phase evaluation
Issue category | Bug because route used without checking that mdoule menu_ui enabled |
---|---|
Issue priority | Normal because most of sites will have menu_ui module enabled |
Disruption | Non-disruptive because system module is always enabled |
Comment | File | Size | Author |
---|---|---|---|
#11 | 2328883-menu_link_content-11.patch | 4.23 KB | andypost |
#11 | interdiff.txt | 3.46 KB | andypost |
#11 | 2328883-menu_link_content-fail.patch | 2.22 KB | andypost |
Comments
Comment #1
dawehnerThis isn't really WSCCI on an abstract level.
Comment #2
andypostNo idea where to put a test, probably it makes sense to add a unittest
Comment #3
andypostelse is not needed
Comment #4
dawehnerSeems okay for now
Comment #7
andypostdo we really need tests for that?
Comment #8
dawehnerI kinda thing we should have an integration tests. Note: this will give you probably some exception at the end of the day.
Comment #9
andypostyep, trying to write a test discovered that the module also use "administer menu" permission that defined in menu_ui module
So it's not clear how to resolve this dependency
Comment #10
dawehnerWell, the test could just do: menu_ui disabled, menu_link_content enabled, and go to '/admin/structure/menu/item/{menu_link_content}/delete' and try to delete it.
Comment #11
andypostintegration fail test + moved permission to system module as suggested at IRC
PS: let's see what broken
Comment #13
dawehnerGreat, thank you!
Comment #14
andypostUpdated IS and added beta evaluation
Comment #15
alexpott@andypost nice find, nice fix and nice test.
Committed 897056b and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.