It would be a good feature if the urlalias are orderable, aka weight in menu. So if you have more then on alias for a node you can choose the preferred alias. It would be also easier to rename nodes who are in the cache of a searchengine.
Maybe a easy way would be column weigth in table 'url_alias'. And on load "ORDER BY weight "

Comments

miche’s picture

I agree. Every alias gets a 'pid'. If you set your Path configurations to keep old alias and add new alias, AND have GlobalRedirect installed, your new aliases never get used.

I propose a change in drupal_lookup_path. When fetching available aliases, although several might get returned, it only grabs the top one (due to db_result). Since the query is only sorting on language, it is possible you get get an old one.

OLD CODE

// Get the most fitting result falling back with alias without language
 $alias = db_result(db_query("SELECT dst FROM {url_alias} WHERE src = '%s' AND language IN('%s', '') ORDER BY language DESC", $path, $path_language));

NEW CODE

// Get the result with the highest pid (most recent) with appropriate language
$alias = db_result(db_query("SELECT dst FROM {url_alias} WHERE src = '%s' AND language IN('%s', '') ORDER BY language DESC, pid DESC", $path, $path_language));

So, your request to have a weight column could be solved with the current schema if you knew that the most recent alias was going to be used.

Does anyone have a reason why this would be a bad idea?

miche’s picture

Status: Active » Closed (fixed)

This has been resolved in 6.16! http://drupal.org/node/358315