So I have an interesting problem that I'm wondering if anyone has come across before and knows how to fix:

My entire site is 1 big menu, with node aliases being generated by the menu hierarchy e.g /foo/bar/baz would be for a node titled Baz, who's parent is Bar and grandparent is Foo. The problems I have are:

1) If Foo or Bar are renamed, Baz now has an alias that does not match up to what pathauto considers it's correct alias, meaning the Generate automatic alias box in unticked.
2) If Foo or Bar are reparented in the menu then the same problem occurs

This is easy enough to fix when it's 1 or 2 nodes as you can just edit, retick the auto alias box and everything's fine. But this site may have hundreds of nodes that are being moved around and it's just not feasible to update them all. Furthermore, we can't delete and bulk regenerate the content aliases on the site when this happens as this would take far too long and leaves the possibility of content being unaliased when users are visiting the site.

Any help with this issue would be greatly appreciated!

Cheers,
Adam

Comments

klonos’s picture

Title:Issues around using menu hierarchy aliases and re-parenting/changing the title of parent nodes.» [menupath-*] alias generation/update should be triggered when menu settings of a node or any of its parents are changed.
Category:support» feature

I'm facing the same issue.

Is this perhaps a core bug? I mean should menu/path changes of a node trigger some update hooks while they actually don't?

acbramley’s picture

klonos’s picture

Status:Closed (duplicate)» Active

Please see full explanation in my comment in #961972-7: [menupath-raw] not creating aliases when updating a node which previously had no menu entry. The gist of it boils down to:

...

Since pathauto needs to hook on the menu edit functions whether they are triggered from the node edit form directly this will be partially handled by #936222: Merge in pathauto_persist module functionality to prevent losing manual aliases with node_save() calls. What will not be handled is these two cases though:

- If one does not edit the node in order to assign a menu entry to a node but they do it through the menu admin page instead.

- If one edits either a node or a menu entry that is a parent of one or several children nodes. The paths of these nodes need to be updated recursively down the menu tree hierarchy. #936222: Merge in pathauto_persist module functionality to prevent losing manual aliases with node_save() calls simply does not account for this case.

Ambidex’s picture

Issue summary:View changes

Any updates on this? I'm currently working on a project which depends heavily on restructuring the menu from time-to-time and which should trigger rebuilding the path alias for each node which is moved in the menu, including children.