The "Give other modules a chance to clean this alias." part of pathauto_clean_alias() doesn't work. Instead of

<?php
module_invoke_all('pathauto_clean_alias', $output);
?>

Use:

<?php
drupal_alter('pathauto_clean_alias', $output);
?>

The reason it doesn't work is that module_invoke_all expects its parameter to be an array, and merges any returned values into that array. If the beginning value isn't an array, the whole house of cards comes falling down and your alterations never make it in. drupal_alter however lets you do your altering like so (here's an example):

<?php
function modulename_pathauto_clean_alias_alter(&$alias) {
  $alias = str_replace('&', 'and', $alias);
}
?>
CommentFileSizeAuthor
#1 pathauto_alter.patch420 bytesmoonray

Comments

moonray’s picture

StatusFileSize
new420 bytes
dave reid’s picture

Status: Needs review » Fixed

It's already been changed to pathauto_alias_alter() in 6.x-1.4.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.