You can set both main and secondary links to a single menu - this needs a test.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | set_menu_as_primary_and_secondary_menu_links_v2.patch | 3.76 KB | frega |
| #5 | set_menu_as_primary_and_secondary_menu_links.patch | 3.78 KB | frega |
| #1 | patch-293525.patch | 521 bytes | clemens.tolboom |
Comments
Comment #1
clemens.tolboomTo be continued
Comment #2
frega commentedPlan of attack:
1. Create a new menu (#TEST293525#)
2. Add item to that menu new menu (#MENUITEM293525#)
3. Use q=admin/build/menu/settings to set #TEST293525# as the primary (main) and secondary menu
4. assert that #MENUITEM293525# shows up accordingly in the pages
Comment #3
clemens.tolboomThis still does not work ... what is wrong?
Comment #4
lilou commentedComment #5
frega commentedI hope i am actually testing what this issue is about - first test anxiety ... please find the testing patch attached.
please note: I have added a helper method ( addCustomMenuWithoutEnablingBlock() ) that duplicates most of MenuTestCase::addCustomMenu(). If you think this is useful I can rewrite the patch slightly, changing addCustomMenu() so that you can pass on in which region (if any) you want the block with the menu-links to be displayed.
All the best from budapest airport - thanks for an amazing drupalcon.
Comment #7
clemens.tolboomI was thinking this
$this->drupalLogin($this->big_user);too. At least that explains maybe my error.@frega : I don't understand that helper functions. Why do we need this? We only have to set both main menu and secondary to the same menu. Right? What do you think of my code in #3 plus this drupalLogin ... shouldn't that be enough?
Comment #8
frega commented@clemens: the helper function prevents the block from being displayed automatically ... if it is displayed automatically (i.e. it is in the source of the page) it is more difficult to assert, that the menu links show up when they are assigned to the primary and secondary menu. you know i would have to distinguish between the test menu being displayed in a "block" or in the primary and secondary navigation.
in your patch a few things lack, i think - but i might be very wrong :): for example you need to nest the menus so that we have the effect of the nested item showing up in the secondary menu ...
i am not sure whether we have to take any more action to get my patch "applied" / tested ...
hope you got back safely to the NL - best, fredrik
Comment #9
frega commentedCosmetic patch update, trying to get the DrupalTestbedBot to test the patch. It seems DrupalTestbedBot never tried to apply patch in #5 (http://drupal.org/node/293525#comment-988048).
Comment #10
clemens.tolboomI still don't get it :( The code below is afaik the shortest solution ... but the $item1 menu ran before ok and now not. So still not a patch.
What is wrong with this code below?
Comment #11
Anonymous (not verified) commentedThe last submitted patch failed testing.
Comment #12
catchMoving this out of the critical bugs queue - see #607038: Meta issue: fix gaps in code coverage.