Pathauto 5.x-1.x to 5.x-2.x New Features and Upgrade Guide

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

For users upgrading from Pathauto 5.x-1 to 5.x-2 here are some tips:

5.x-2.0 to 5.x-2.1 note:

The Internal feed alias text (leave blank to disable): is used to determine what, if any, feed alias will be created for the nodes. This was hardcoded previously but due to the fact that other modules can provide the rss feed (e.g. Views) it is now exposed as something that you can change. In general you should either leave it blank or leave it at the default. If you use views for your taxonomy aliases you probable want to use "feed" instead of the default "0/feed".

First, why upgrade? New features and bugfixes

New "Update Action" Make Old Alias Redirect to new alias

If you enable the Path Redirect module you will see a new Update Action. Currently the default Update Action is to create a new alias replacing the old alias. This is an attempt to balance performance and search engine optimization with "link rot". The new ability to make your old links provide a redirect to the new location provides an even better solution to the problem and is highly recommended.

Automatic Aliasing Optional during Content Creation

Those with the ability to set a path manually now get a check box during content creation and editing. This allows them to either allow Pathauto to create the alias automatically or manually create one themselves.

Punctuation Control

You now have control over how every punctuation character is handled. You can have them removed, replaced with the separator, or passed through and included in the URL. This feature helps provide greater control over how aliases will look.

Transliteration Optional

Like in 5.x-1.x, Transliteration is optional. You can enable it by renaming the i18n-ascii.example.txt file to i18n-ascii.txt and then changing the setting in the admin interface. You can edit this file - future upgrades will only overwrite the example file. See also the handbook for advice on customizing it for more languages beyond what is included in the example file: http://drupal.org/node/185664

Optional Lower Case Characters

Much like transliteration being optional, site administrators now have the option of using the case of the original values instead of forcing them to lower case.

Pattern Replacement Enhanced by Token Module

Pathauto now relies on the Token module for tokens. This provides site administrators with a much larger number of tokens to use in creating aliases. It also allows integration with a much larger number of modules.

Bulk Alias Deletion

Pathauto has always made it easy to build aliases, now it makes it easy to delete aliases. You can delete all aliases or just certain kinds of aliases such as aliases for users, aliases for content, etc.

Make Bulk Generation Scalable

The Bulk Generation feature now runs in configurable sized chunks so that even a large site or a site on a slow server can build aliases for hundreds of thousands of objects.

Token Installation

Be sure to install the Token Module prior to upgrading your Pathauto installation. If you don't, it's possible to get into a state where you site is throwing errors and you can't enable Token because the checkbox is disabled by system module. To resolve that simple disable Pathauto and re-enable Pathauto.

Upgrade Changes (decided to upgrade? read this)

Because Pathauto 5.x-2.x uses the Token module and because the Token module rebuilt the patterns with an eye towards consistency, extensibility, and security for other modules to use, their had to make some changes to the patterns that Pathauto uses.


General Pattern Tips

When given the choice, you should use a -raw version of a token. For example, instead of [title] use the [title-raw]. This is necessary for Pathauto's punctuation replacement to work properly. Despite the warning about raw user input, the Drupal path module (which Pathauto relies on) filters the raw information so within Pathauto it is safe to use these -raw tokens.

For "Content Patterns"

[user] should be [author-name-raw]
[cat] should be [term-raw]
[catpath] should be [termpath-raw]

For User Patterns

(I don't think there are any changes here other than the -raw change.)

For Taxonomy Patterns

(I don't think there are any changes here other than the -raw change.)


How Bulk Generate differs from the old Bulk Update

Now the Bulk Generation feature simply creates aliases for objects which are not currently aliased and it only does this for a small number in each execution. So, if you want to rebuild aliases for a certain kind of object then you must first delete it and then Bulk Generate it. You can find a helper tool at http://example.com/admin/build/path/delete_bulk which will help you delete large numbers of aliases. See the handbook for more details - http://drupal.org/node/144904


Features Removed

Index aliases are no longer available. If you really need that feature see how to create it by pairing pathauto patterns with the Views module http://drupal.org/node/124462 See http://drupal.org/node/91116 for the motivation to remove this feature.

To get similar functionality to index aliases with a lot more value and control, try out the pairing of Pathauto with Views module as detailed in this video

You can delete all of the index aliases following instructions for cleaning up path aliases.

Paths

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week