All path or URL alias token names need to end in "path", "path-raw", or "alias", so Pathauto does not strip the slashes from token values.

This is some magic code in pathauto_clean_token_values() in pathauto.inc.

Comments

qbnflaco’s picture

I tried this patch and it didn't work for me. :-( It's still not getting the proper path using pathauto. It's still ignoring the menu trail parents.

sun’s picture

Did you change your pathauto tokens to use [menu-trail-parents-path-raw] before testing?

sun’s picture

Status: Needs review » Fixed

The current tokens cannot work at all. So no module update required. Hence, committed.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

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

halth’s picture

Issue summary: View changes

Posting this here for others landing from a search engine (just like me) and looking for a solution to this problem.

As of the date of this post and considering pathauto version 1.13, you should add your custom token to the Safe Tokens field in pathauto settings (/admin/config/search/path/settings).

Just ending your token name in one of the strings mentioned in the ticket description won't do it.

Good luck.