I have a book with three child pages. I set the pathauto placeholder to [bookpath], but encountered the following problems:

1.) No alias for the book page (top-level) is generated. There is just a message saying the 'book page was updated'
2.) When I create a child page, pathauto prints out a message saying the alias was generated, but the url path settings field shows nothing.

Screenshot attached for problem 1

Comments

venkat-rk’s picture

StatusFileSize
new10.58 KB

1st screenshot for problem no.2

The contradiction between the pathauto message and the browser url can be seen.

venkat-rk’s picture

StatusFileSize
new1.53 KB

No alias in the url path settings field when I edit the book page.

venkat-rk’s picture

The alias is finally created after I manually entered it in the url path settings.

venkat-rk’s picture

I looked at this again on a fresh site without additional modules (category, for instance) that might muddle the picture. Pathauto seems completely broken for book pages.

Details

  1. Create a book (a book page with parent as top-level)
  2. Create a couple of child pages

Pathauto experience

  1. Neither the [book] nor the [bookpath] placeholders generated an alias for the *top-level page*. I didn't feel this was a bug because pathauto may be programmed to generate the alias for the top level page only when a child page is added. Fine
  2. When a child page is added and the placeholder is [bookpath], an onscreen message says the alias has been created. However, the alias is that of the top-level page and NOT the child page.
  3. Contrary to pathauto's onscreen message no alias is seen at ..admin/path
  4. I tried checking the 'Create index aliases' along with the [bookpath] placeholder, but again with no results
  5. I tried each of the 'update action' settings one by one in conjunction with [bookpath], but again with no results
  6. I even tried [book]/[bookpath] as the placeholder pattern in desperation, but was rewarded with the alias ../book-name/book-name. Still no child page and no alias at ../admin/path

    Without pathauto

    I turned off pathauto and manually entered the aliases for the book pages. Worked perfectly.

    So it seems pathauto has a definite problem with book page aliases. Since book is a core module, it doesn't have any code in it for pathauto, rather it is pathauto that has placeholder codes for creating book pages aliases.

    No screenshots this time. I did it once (as I do for most bug reports) and was given a big lecture in return and felt like a fool. I hope at least this helps someone.

venkat-rk’s picture

Reconfirming this bug even with the latest pathatuo module. When placeholder is set to [bookpath] and the top level book page is created, its corresponding alias is *not* created. Instead, the url is www.example.com/node/nid

When a child page is added to this top level page, the alias is generated, but it aliases the book's name, not the title of the child page.

NickHBO’s picture

I can confirm this issue. I do get proper bookpath aliases; however, I also get page-style aliases. Whatever pattern is used for my "page" nodes is also used on every single book node.

It is possible that the bookpath aliases I see are from before the code was broken, as I have used pathauto for a long time. Deleting all the page-like aliases for the nodes and running bulk update puts them right back, so it's certainly reproducible.

I hope someone can find a solution to this soon; as site content grows, the number of aliases to delete grows n*3 (if you turn on feed and index aliases).

venkat-rk’s picture

Thanks for confirming that I am not alone. But in my setup, I was not using the page module, so there may be two variants of this bug actually.

greggles’s picture

Deleting all the page-like aliases for the nodes and running bulk update puts them right back, so it's certainly reproducible.

@NickHBO - are you saying that a bulk update fixes the problem? If so that leads a little further towards clues of how to fix this.

The.Clue’s picture

confirmed.

but different behaviour: til yesterday it worked like a charm, then after a bulk update....everything messed up!

i truncated url_alias table on database and redid from start. no changes: book and bookpath now are broken
and google is VERY UNHAPPY for this -.-

greggles’s picture

Status: Active » Closed (fixed)

Thanks to everyone for your help so far. In order to fix this I need to be able to repeat it and in order to repeat it I need a "simplified repeatable test case" which causes this problem.

Please, start with a brand new Drupal5.x site, enable the book, pathauto 5.x-2.0, token 5.x-1.9, and provide the shortest list of steps possible to repeat this problem. I empathize with getting bad paths, but I can't fix the problem until I can repeat it and the descriptions of the problem so far don't help me. I'm closing this until someone can clarify.