1. Install 4.7.0-rc2 from scratch
2. Create a new site and a new database for the site
3. Create the initial admin user
4. After login, go to "administer" -> "menus"
5. From the "Navigation" menu, click the "edit" link for the "create content" menu item
6. Don't change anything on the following page, just click the "submit" button
7. Logout
--> The "Navigation" menu now shows up with the "create content" link as its only entry. I think a visitor that is not logged in should never see the "create content" link (unless of course I give him the corresponding access rights).
Note: I'm not sure whether I have assigned this report to the correct component...
Comments
Comment #1
pfaocleConfirmed in 4.7.0 following the steps above. This may be a duplicate - I've seen a couple of issues about this menu item recently.
Comment #2
magico commentedStill reproducible.
Comment #3
magico commentedA bit more info on this duplicate http://drupal.org/node/67069
Comment #4
AjK commentedJust saving the menu item cause it's type value to change from 28 (default 0x001C) to 62 (0x003E). This corresponds to two flags being set:-
MENU_MODIFIED_BY_ADMIN is understandable, it's been modified by an admin. However, the other two flags appear to be being set by this code in menu.module (line 411) :
So, this is the reason. Just need to figure out what that's actually doing (or why).
Comment #5
wicksteedc commentedI think that the intention was just to be helpful, because at first thought there is not much point in changing the settings on a menu item if it is not visible. But the "create content" menu has the MENU_VISIBLE_IF_HAS_CHILDREN flag set, and not MENU_VISIBLE_IN_TREE, so that it is visible only if the user is authorised to see any of its children (eg node/add/page). So I think we need to change this code to read:
// Always enable menu items (but not menus) when editing them.
// Unless already conditionally visible.
if (!($item['type'] & (MENU_IS_ROOT | MENU_VISIBLE_IF_HAS_CHILDREN)) {
$item['type'] |= MENU_VISIBLE_IN_TREE | MENU_VISIBLE_IN_BREADCRUMB;
}
See also the code further down menu.module which confirms that MENU_VISIBLE_IF_HAS_CHILDREN items do not participate in enabling and disabling, ie they should not be enabled using MENU_VISIBLE_IN_TREE:
// Set the disable column.
if ($item['type'] & (MENU_IS_ROOT | MENU_VISIBLE_IF_HAS_CHILDREN)) {
Charles
Comment #6
safepants commentedi had this problem and fixed it by hitting the reset button in drupal 5 beta 1 in menu administration. It doesn't show up now when anonymous users view pages.
Comment #7
chx commentedComment #8
(not verified) commentedComment #9
filiptc commentedDefinitely not fixed/closed.
If you were to change the parent menu of the 'create content' item (i.e. to a new menu called 'Admin') you not only get the 'create content' shown but the whole menu too. This needs a fix. Resetting the item takes it back to the default menu which limits the user's choice making.
Phil
Comment #10
geodaniel commentedI'm seeing this in 5.0-rc2 too. In #107203 jptavan confirms this is also present in HEAD.
As has already been said, clicking 'reset' on the menu hides it again for the anonymous user (but also removes any changes you may have made to the menu), so this workaround is not ideal.
Comment #11
FiReaNGeL commentedYup, I stumbled upon it today. Bloody annoying. That and the 'locked' menu items.
Comment #12
JohnForsythe commentedI am also affected by this issue. Hoping for a fix soon.
Comment #13
newbuntu commentedI am affected by the same problem with 5.1. Hope for a fix.
Comment #14
mlncn commentedCould this be fixed in 5?
- ben :: http://AgaricDesign.com
Comment #15
Dave Cohen commented+1 for the patch in comment #5. Worked for me in 5.x. Sounds like it works, but was never actually checked in.
Comment #16
fwalch commentedThis bug doesn't occur in 6.x-dev, but in 5.x-dev.
I attached a patch which includes the code from #5.
Comment #17
drummCommitted to 5.x.
Please note you have to reset the menu item and re-edit for changes to take effect.
Comment #18
mlncn commentedfwalch, drumm, you are heroes.
Comment #19
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.