I am using the pattern "artikel/[book-raw]/[title-raw].html" in node path settings to generate aliases for book pages.
But the part [book-raw] is not replaced on root pages of a book.
It should be "artikel/title-of-root-page/title-of-root-page.html" but it is "artikel/[book-raw]/title-of-root-page.html" - respectively "artikel/%5Bbook-raw%5D/title-of-root-page.html" in URLs.

Comments

greggles’s picture

I think the reason for this is that they are the same piece of information so, as your example points out, on the root level the URL would be a duplicate.

The fact that you get [book-raw] seems like a bug. I think that instead of "artikel/[book-raw]/title-of-root-page" it should instead be "artikel/title-of-root-page.html"

Would that work for you?

Also "assigned" is for the person who is going to fix the bug. If you are going to fix it then that's great, but if not please unassign yourself.

netbjarne’s picture

Assigned: jehoho » Unassigned

Just wanted to add that I'm having similar problems with [book-raw] replacement in pathauto 6.x-1.0

tnanek’s picture

Version: 5.x-2.2 » 6.x-1.1

I too am having this same problem using [book-raw] with 6.x-1.1

ged3000’s picture

Me too - for all [book* and [path* tokens. I echo'd the tokens as they were produced by the token module, and the [book* and [path* tokens weren't being created for some reason. Is pathauto sending the right data to the token module?

greggles’s picture

Status: Active » Closed (duplicate)

This is a duplicate of #205799: [book-raw] when there's no parent which has a kind of patch...

j0rd’s picture

greggles:

The fact that you get [book-raw] seems like a bug. I think that instead of "artikel/[book-raw]/title-of-root-page" it should instead be "artikel/title-of-root-page.html"

I'm interested in having artikel/title-of-root-page.html as you mention, instead of artikel/title-of-root-page/title-of-root-page.html

Is there any way to create this? Or where should/can I hook the additional logic?