Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Aug 2012 at 14:24 UTC
Updated:
26 Oct 2015 at 05:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
David_Rothstein commentedI think this is a bug in the user module; menu_link_save() does not specify that 'module' is required, so its existence shouldn't be assumed in the alter hook.
Also, the code comments in shortcut_set_save() explain why we don't want to set 'shortcut' as the module here (but rather rely on the default).
Comment #2
David_Rothstein commentedFor Drupal 8, a better fix might be to consider moving the drupal_alter() call in menu_link_save() a little later (after the defaults have been added to the menu item); that way, the alter hook is actually working with a complete menu link record. If so, this patch could be for the menu system rather than the user module.
However, that change might not necessarily be backportable to Drupal 7.
Comment #3
iamdan commentedI'm not sure what to do with this. I'm getting the error as well when customizing the shortcut bar. 7.22. I've added a few shortcuts and they seem to work. Do I need to be concerned about this re the site. Or is it just a problem when adding these links? Or should I use the patch above? Thanks for your patience with the question.
Comment #4
guypaddock commentedI wholeheartedly agree with #1 -- there is no expectation that
modulemust be provided in the link.Attached is a patch that checks for the key with
isset(). Another approach would be to move thedrupal_alter()call inmenu_link_save()after the application of default values, but I feel like that change would be much more breaking.I know the backport policy, but I'm bumping this to 7.x to get Testbot's attention.
Comment #6
guypaddock commentedGo home, Guy... you're drunk.
Re-roll with correct syntax.
Comment #7
guypaddock commentedPatch works for D7.
Setting to Active for D8 so we can get a D8 patch.
Comment #8
subhojit777Not able to reproduce the problem in latest codebase of Drupal 8
Comment #9
sivaji_ganesh_jojodae commentedI confirm this is not an issue for Drupal 8.
Patch #6 does the needful for Drupal 7.
Comment #10
David_Rothstein commentedYeah, it looks like this code is now long gone from Drupal 8. And a test for something this minor is probably not worth it.
Committed to 7.x - thanks!