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.

Comments

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new5.88 KB

Patch 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.

greggles’s picture

I definitely like this idea and the code looks sound.

dave reid’s picture

Status: Needs review » Reviewed & tested by the community

Great, will commit tomorrow then. :)

dave reid’s picture

dave reid’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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