I know this is a known problem, but I couldn't see an existing issue for it. Right now View Alias does not update or delete terms if they are changed through the UI. This patch abstracts the alias creation procedure so that it can be used in hook_pathauto_bulkupdate() and in hook_taxonomy().

This abstracted function also makes some other changes. Instead of using a custom implementation to generate paths, it instead passes the pattern and tokens to pathauto and lets it handle it. This has the advantage that it automatically supports all of Pathauto's settings including:

- Verbosity (controls drupal_set_message() notices)
- Case sensitivity
- Handling of deleting old aliases on update, or following Pathauto's setting for when updating an alias

Plus the total amount of code seems to remain about the same and our aliases will match others created by Pathautho.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

emackn’s picture

Rolling into head now.

What are the steps again to reproduce the error?

emackn’s picture

Status: Needs review » Needs work

Hmm... After applying this, I can't get the aliases to generate.

I removed all aliases, and still can't generate them.

Andrew Gorokhovets’s picture

+1

sheena_d’s picture

Version: 6.x-2.0-beta7 » 6.x-2.x-dev
Status: Needs work » Needs review
FileSize
9.09 KB

I created a new patch based on quicksketch's original patch that applies to the current dev branch. As far as my testing, this patch will successfully create/update/delete aliases during the appropriate actions on taxonomy terms. It also works correctly for views with multiple vocabularies available to the argument.

sheena_d’s picture

Made a mistake in the previous patch that caused an alias to be created for every term used in any views that used aliases. The attached patch works correctly.

John Franklin’s picture

Issue summary: View changes

There is way too much in that patch out of scope.