Hi everyone,
I'm trying to use [node:book:parent:url:path]/[node:title] for setting up the URLs in a complex book hierarchy. In the ideal case this would leave me with URLs reflecting the whole book hierarchy structure. I would like to use the path of the parent node instead of the name etc. because my client required that he should be able to override some paths (for example we have a node with the title "documentation", he would like to use "docs" instead).
My problem shows up only for several pages (like 20 out of 400+?). It seems that at the time of the alias generation, sometimes [node:book:parent:url:path] is not available yet in an aliased form, so I end up having something like node/1250/random-title as the new alias.
Is there any better way of doing this?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | taxonomy-tree-err.jpg | 33.13 KB | joseph11 |
Comments
Comment #1
scorchio commentedComment #2
joseph11 commentedI have similar problem and I believe that it has to do something with [term:parent:url:path] token.
My situation:
I'm using token combination [term:parent:url:path]/[term:name] to generate tree-like taxonomy term path. Works ALMOST as expected.
The problem is occurring when some term is 2 or more levels deep in structure - then it generates un-aliased path for second level term, BUT continues to generate aliased paths for following levels.
I'm attaching screenshot that might be more helpful than my description.
Thank you in advance.
Comment #3
dave reidComment #3.0
dave reidFinished the issue description, oops...
Comment #4
bohemier commentedThe way I solve this is by using admin views, updating the node admin view by adding a bulk operation field and checking Update Node Alias in the operations. Then I add a Book Depth field so I can sort items. Save your view then open it at admin/content. Sort items by Book Depth, select all items and execute Update Node Alias. This will generate url aliases by depth, updating parents before children.
Since this is indended for manual operations, I am making this as closed(works as designed). You are welcome to reopen it is this is not the case.