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...

CommentFileSizeAuthor
#16 menu.module_5.patch837 bytesfwalch

Comments

pfaocle’s picture

Version: 4.7.0-rc2 » 4.7.0

Confirmed 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.

magico’s picture

Version: 4.7.0 » x.y.z

Still reproducible.

magico’s picture

A bit more info on this duplicate http://drupal.org/node/67069

AjK’s picture

Just 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_VISIBLE_IN_TREE
  • MENU_VISIBLE_IN_BREADCRUMB
  • MENU_MODIFIED_BY_ADMIN

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) :

  // Always enable menu items (but not menus) when editing them.
  if (!($item['type'] & MENU_IS_ROOT)) {
    $item['type'] |= MENU_VISIBLE_IN_TREE | MENU_VISIBLE_IN_BREADCRUMB;
  }

So, this is the reason. Just need to figure out what that's actually doing (or why).

wicksteedc’s picture

I 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

safepants’s picture

Version: x.y.z » 5.0-beta1

i 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.

chx’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
filiptc’s picture

Version: 5.0-beta1 » 5.0-rc1
Status: Closed (fixed) » Active

Definitely 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

geodaniel’s picture

Version: 5.0-rc1 » 5.x-dev

I'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.

FiReaNGeL’s picture

Version: 5.x-dev » 6.x-dev

Yup, I stumbled upon it today. Bloody annoying. That and the 'locked' menu items.

JohnForsythe’s picture

I am also affected by this issue. Hoping for a fix soon.

newbuntu’s picture

I am affected by the same problem with 5.1. Hope for a fix.

mlncn’s picture

Could this be fixed in 5?

- ben :: http://AgaricDesign.com

Dave Cohen’s picture

+1 for the patch in comment #5. Worked for me in 5.x. Sounds like it works, but was never actually checked in.

fwalch’s picture

Version: 6.x-dev » 5.x-dev
Status: Active » Needs review
StatusFileSize
new837 bytes

This bug doesn't occur in 6.x-dev, but in 5.x-dev.
I attached a patch which includes the code from #5.

drumm’s picture

Status: Needs review » Fixed

Committed to 5.x.

Please note you have to reset the menu item and re-edit for changes to take effect.

mlncn’s picture

fwalch, drumm, you are heroes.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.