Index: pathauto.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.inc,v retrieving revision 1.1.2.43 diff -u -p -r1.1.2.43 pathauto.inc --- pathauto.inc 16 May 2008 16:42:05 -0000 1.1.2.43 +++ pathauto.inc 22 May 2008 18:18:52 -0000 @@ -59,6 +59,10 @@ define('PREG_CLASS_ALNUM', function _pathauto_alias_exists($alias, $src) { $alias_pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s' AND src <> '%s'", $alias, $src, 0, 1)); if (db_table_exists('path_redirect')) { + // Delete from path_redirect table the exact same alias to the same node + db_query("DELETE FROM {path_redirect} WHERE path = '%s' AND redirect = '%s'", $alias, $src); + + // If there still is this alias used in path_redirect, then create a different alias $redirect_rid = db_result(db_query_range("SELECT rid FROM {path_redirect} WHERE path = '%s'", $alias, 0, 1)); } if ($alias_pid || $redirect_rid) {