I have this URL redirect (path_redirect module):
From: abc/xyz
To: http://www.google.com/

In Drupal 5, I could alias it (path module):
Existing system path: abc/xyz
Path alias: xyz

Drupal 6 prohibits it, giving me "The path 'abc/xyz' is either invalid or you do not have access to it."

I expect it to work as it did in Drupal 5, redirecting me to the external site.

Comments

Daniel Norton’s picture

Looking at the code, this might be an issue with the Path Redirect module, and I've entered a related issue there (#341873: Redirects not visible to menu_get_item).

The Path module relies on the Drupal API function menu_get_item to report the availability and accessibility of a path, but that function is unaware of the paths created by URL redirects.

I'm not sure if this is:

  1. A core issue (a fault of menu_get_item),
  2. an issue with the Path module (perhaps Path shouldn't care if a path exists, only that if it does exist that it must be marked available or perhaps it shouldn't be calling menu_get_item to determine that), or
  3. an issue with the Path Redirect module (perhaps Path Redirect should update some internal structure that menu_get_item is tracking).
dave reid’s picture

Project: Path » Drupal core
Version: » 6.x-dev
Component: Code » path.module
Status: Active » Closed (won't fix)

There's not much the Drupal core path module can do. Path_redirect does not use hook_menu() to intercept redirects, so they are not valid paths in menu_get_item(), as they should be.