Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
menu system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Jul 2008 at 13:57 UTC
Updated:
19 Sep 2008 at 08:42 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedpatch - minimally tested
Comment #2
moshe weitzman commentedthis is breaking an upcoming Views feature: #284893: Allow admin to place menu items into primary links or other menus.. i will review this soon.
Comment #3
moshe weitzman commentedI tested that this allows uncustomized items to be moved to another menu and does not allow save for customized. This should backport to 6 after commit to HEAD.
Comment #4
moshe weitzman commentedBump - this is a bug fix. Please commit and backport. chx has agreed with the patch as well.
Comment #5
dries commentedSubtle (or not so subtle) features or bugs like these are best committed along with a test case. If we break the behavior, we want to know this instantly.
Comment #6
greg.harvey+1 this - I'm experiencing the issue with D6. Failing code looks like this:
'menu_name' is ignored. Judging by the title of this issue, I guess it would've worked if I'd placed this code first time, but subsequent updates to 'menu_name' fail, but I didn't test for that. Just simply 'menu_name' is ignored in Drupal 6.4 with the above code.
I guess you could turn the above in to a test case by setting the
$menu_nameto something that exists and setting$content_typeto'page'(assuming you have some pages). Check the menu builds correctly, change$menu_nameto something else, clear caches and see what happens. Old behaviour is "nothing - menu item stays where it is!"Comment #7
moshe weitzman commentedHere is a set of test files that confirm that Peter's patch above is a successful bug fix and never shall we break it :)
These files are the start to a full suite of hook_menu() tests. These files belong in modules/simpletest/files. Remove the .txt extension. They don't belong with the existing menu tests since those tests the menu.module which is a GUI for menu.inc. These files are for non GUI functionality.
As mentioned before, Peters patch should be applied to D6 once this lands in HEAD.
Comment #8
pwolanin commentedHere is a complete patch with new test and dummy module. The test fails in the absence of the patch to menu.inc, and succeeds after the test is applied.
The new test files will need cvs add, of course.
Comment #9
webchickchx and I both cringed at the $GLOBALS thing in there, which could possibly affect the environment running the tests, rather than the test environment. Marking CNW for now, but once the test is fixed up, this should be good to go according to chx, moshe, and earl. :)
Comment #10
pwolanin commentedhere's a re-wroked test uses a query string and the UI.
Comment #11
moshe weitzman commentedWorks well and fixes the bug.
Comment #12
webchickCommitted to HEAD. Thanks, Peter!
Comment #13
moshe weitzman commentedChanging to D6 for the bug fix. Please just commit the patch to menu.inc, not the test files.
Comment #14
dries commentedCommitted to DRUPAL-6 as well. Thanks! :)
Comment #15
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.