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.
Problem/Motivation
The "menu-" convention only applies to custom menus created through the web UI. On migrations, the menu machine names likely don't begin with menu as in my case.
This would only affect existing menus when the module is enabled.
Proposed resolution
use menu_get_names(FALSE) to get all custom menus. The false parameters filters off system menus. Then remove the check for menu names beginning with "menu-"
Remaining tasks
I will attach a patch.
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#1 | update-only-finds-some-custom-menus-1263630.patch | 668 bytes | johnbarclay |
Comments
Comment #1
johnbarclay CreditAttribution: johnbarclay commentedpatch attached.
Comment #2
JohnAlbinI can't alter an existing update function. A fix would require a new update function.
Also, is this needed now that Drupal core is fixed?