OK... Since I started using Drupal (4.6), all I had to do to add a menu item for a page whose url alias was 'foo' was to pick the menu I wanted to put it in and add an item named "Foo Menu Item" with path 'foo' -- done.

Now, if I try to do that, I get an error saying, "The path 'foo' is either invalid or you do not have access to it." (menu_get_item('foo') returns false)

On the other hand, if I create a page and give it the alias 'foo' and make it a menu item on 'node/add/page' form, everything works fine.

If 'foo' is an alias for node/x, I can create a menu item that points to node/x

Furthermore, I used to be able to add a menu item with a path that didn't even exist yet. This was very nice while developing a new site since I often layout the navigation before working on content. I don't think this is possible anymore either.

Why can't I create a simple menu item pointing to a URL alias?

BTW -- version 6 is great!!! from 4-6, Drupal is evolving beautifully -- Great Job -- to everyone in development!

Comments

chx’s picture

Status: Active » Closed (works as designed)

This has been raised many times. The menu system runs an unified access check -- you can't add paths that you do not have access for. The error message is telling the truth. And you can create a page to an alias, though it will store it sourced.

sumgai’s picture

Thanks, but that's not what I'm experiencing.

I'm running as user 1, so I should have access to everything.

But, if I try to add a menu item with path 'foo', I get the error.

If I use 'node/', it works.

So, I'm unable to create a menu item that is using an alias as the path.

Node 'foo' actually exists (node/15).

mitch