In my site, I see a "create content" menu item with path "node/add". I want this menu to be visibile only if an administer role has logged in. How? Right now everyone can see this menu item -- including non-registered user.

Comments

coreyp_1’s picture

Have you set it to be always expanded? That could cause the problem.

- Corey

nancydru’s picture

First, make sure your access controls are set properly. Then go to the menu admin function. Above "create content" you will see "Content" and it is probably disabled. Enable it. Then you'll see a "reset" link next to it, click that. Now the "Create content" link should go away for anyone who doesn't have access. Kind of hokey, I know, but it works.

Nancy W.
now running 5 sites on Drupal so far
Drupal Cookbook (for New Drupallers)
Adding Hidden Site Design Notes

artcoder’s picture

The expanded checkbox for the menu is not checked.

I put the "Create content" menu item under the Administer menu. And when I log in as administrator it is under the administer menu as it should be and the menu item works fine.

However, the problem is... After I have logged out, the administer menu disappear (as expected). But of all things, the "Create content" pops out of the administer menu and is at the root menu. I would like for the "Create content" menu to not show up when admin is not logged in.

I think the Access controls are set correctly because if I click the Create content menu when not logged in, it says "No content types available."

Also there is menu item that is called "My Account" and it is "Locked" which means that I can not edit or disable or enable it. How do I unlock it?

artcoder

coreyp_1’s picture

I put the "Create content" menu item under the Administer menu. And when I log in as administrator it is under the administer menu as it should be and the menu item works fine.

Any time you edit a menu item, it makes it available to everyone, regardless of the access permissions. I know, I know. I don't like it either, but maybe this will change in future versions of Drupal.

Follow these steps:

  1. Go to your menu administration page (admin/build/menu). Scroll down to the "Create content" menu item. To the far right of the row, there is a "reset" link. Click it, then confirm that you want to reset the link. This will restore the menu item to it's proper place, below "Content".
  2. Look for the "Content" menu item that is disabled. "Create content" should now be directly below it. Enable the "Content" menu item.
  3. Clicking "enable" will bring you to a screen where you can edit the "Content" menu item. Under "Parent Item", select "Administer". Save the change.
  4. Now, scroll down and find the "Content" menu item again. Be careful, there is more than one! Look for the one that has the "Create content" menu item below it. Disable the "Content" menu item.

This procedure will, in effect, move "Create content" into the Administration menu, but it will not be visible to anonymous users. You might be able to change it's position by changing the weight of "Content", but I'm not sure. Do not edit "Create content, however, or you will be in the same boat as before.

Now, as for the "My Account" link. This menu item cannot be unlocked or changed (without hacking the source code, that is). It is a necessary link for all registered users, so that they can access their account information, make changes, etc. Why are you trying to unlock it? Maybe there is another option.

- Corey

nancydru’s picture

Thanks, Corey, for explaining this more clearly than I did.

I added a brand new item to the admin menu and had the same problem. I do hope this gets fixed soon. Meanwhile, I'm having to create a module just to do what I wanted.

Nancy W.
now running 5 sites on Drupal so far
Drupal Cookbook (for New Drupallers)
Adding Hidden Site Design Notes

artcoder’s picture

Ah, I see now. That's good to know.

About the "My Account" menu... I didn't need to change it. I was just curious as to why it showed "locked". But now I know.

Thanks.

artcoder

crbassett’s picture

Thanks. This "reset" tip worked for me. Kind of odd, yes, but it works.

pcc’s picture

Hi Everyone,

New Drupal user here. It seems like I'm actually having the opposite problem as everyone here. I was manipulating the menus and I decided to click the reset link for "Content" under the Menu Administration section and now the Content link is gone. Please note that it's not disabled, but completely gone from my list of available menu items (I've looked multiple times). I've also checked the permissions several times to make sure I haven't missed anything. The Admin has rights to Manage the Menus both in the Modules and in the Access Controls. I was able to actually replicate the 'disappearance' in two separate Drupal installs on two different environments to see if I had possibly clicked something else that made it disappear, but it seems like I didn't and the cause is the reset.

Has anyone had this issue before and does anyone know how to get the Content link to come back? Also note that I tried creating another "Content" link that points to node as the path, but it doesn't work the same as the default version.

I've also tried to click the reset link for the Create Contents, but all it does is place the Create Contents under a completely different menu that I have Added that has a link in it called Home (which points to node).

Any help is much appreciated.

Drupal ver 5.3

nancydru’s picture

Well, to start with, I don't think I've ever seen a site where the "Content" item was visible. I've done it and found no value in it. "Create content" is the item you need.

The correct path, I believe would be "node/add". Then you would have to edit the "Create content" item to place it back under the "Content" item.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

write2David’s picture

Using Drupal 5.1, I had tried getting the above suggestions (and this one) to work, but either couldn't or had mixed results.

So, I followed this suggestion, using the Menu-Per-Role module, and it works fine on my site.

-David