I've been experiencing problems with node/id appearing in URL aliases where I've used the [node:menu-link:parent:url:path] token.

I'm pretty confident I've tracked this down to the execution order of Pathauto, say I have two nodes:

New Node (id 100)
Old Node (id 50)

And I use the following pattern for URLs:


If I structure the menu like so:

Old Node
- New Node

Then the URL structure would output correctly like so:


However I structure the menu like so:

New Node
- Old Node

Then the URL structure output is:


This appears to be because Pathauto processes nodes in order of ID (so oldest to newest) which would make sense in most cases, however in the above example, it means that a child menu item is generated before its parent, and thus instead of pulling through the processed value for [node:menu-link:parent:url:path] it simply pulls through the default node/id value.

I can't seem to find a way of getting around by changing any settings, the only feasible way I can see is to re-create old nodes so the menu structure correctly maps to the node id values, this would be very cumbersome though (there's quite a lot of pages, and it would be difficult to do this in such a way as to not effect the live site).

Is there a way that nodes can be processed in order of the structure of a menu? This would seem like a reasonable solution to me (although I can envisage problems with multiple menus for example).


sean_dunwoody created an issue. See original summary.

jacqueschoquette’s picture

Similar problem any luck getting this sorted?

ben.kyriakou’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Priority: Normal » Major

I'm moving this to apply to dev, since it's still an issue, and upping the priority as it will affect any site and is a fairly major flaw in the processing logic.

sean_dunwoody’s picture

Issue summary: View changes

Fixed spelling error

sijuwi’s picture

Also have this issue - only way I can deal with it is by creating another alias with nodesymlinks module