Closed (fixed)
Project:
Pathauto
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2010 at 23:42 UTC
Updated:
14 Aug 2010 at 19:00 UTC
Jump to comment: Most recent file
Say I have a general node path like content/[node:book:title]. If I create a node that is not in a book, it gets an automatic alias of 'content'. I would prefer to not even have an alias created if none of the tokens in the URL are replaced.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 867854-pathauto-notokens-noalias-noservice-D7.patch | 5.88 KB | dave reid |
Comments
Comment #1
dave reidPatch adds form validation to ensure non-empty paths have at least one token in them, and adds a check in pathauto_create_alias() if the token-replaced pattern string matches a pattern with its tokens emptied out.
Comment #2
gregglesI definitely like this idea and the code looks sound.
Comment #3
dave reidGreat, will commit tomorrow then. :)
Comment #4
dave reid#1: 867854-pathauto-notokens-noalias-noservice-D7.patch queued for re-testing.
Comment #5
dave reidCommitted to both 7.x-1.x and 6.x-2.x:
http://drupal.org/cvs?commit=400836
http://drupal.org/cvs?commit=400838