After editing a book hierarchy, the titles of some bookpages are blanked out.
It doesn't matter if anything is changed, just saving is enough.
The page locations are also changed to the root of the book. There they remain grouped but in random locations (top/bottom of hierarchy). [see pic 1]

This only occurred with 3 out of the 40 book items. The only difference is the presence of double quotations (basic, i.e. non-tilted) in the title. After removing them, or replacing them with single quotations, the page doesn't suffer from the bug. When adding double quotations the title blanks however.

In revisions the change registers as if the current user changed the title to nothing. [image 2]
The only solution is to revise and change the book location from the page itself.

Pages with single or, 'tilted' double quotation do not suffer the problem. [attachment #3, the top quotes give problems but not the other type]

Best regards,

ps. Running drupal 6.2, with simplenews/lightbox/image (alpha2)/img. Editing with FF3

CommentFileSizeAuthor
#3 book-double-quotes-bug.patch832 bytesmaartenvg
problem3.png510 bytesw8461
problem2.png2.84 KBw8461
problem.png2.32 KBw8461

Comments

gpk’s picture

Title: bookpage titles dissapears when editing book hierarchy » Cannot have double quotes in book page title (title disappears when editing book hierarchy)
Version: 6.2 » 6.4

Marked #317614: Bug: Enter Double Quote in Book's Title to replicate this bug as duplicate.

Also clarified title/updated version.

maartenvg’s picture

Marked #321113: Re-ordering book causes nodes to lose title as duplicate.

I'll research this a bit more and see if there's a solution.

maartenvg’s picture

Status: Active » Needs review
StatusFileSize
new832 bytes

Found the culprit. The form IDs of the fields are based on the title. If that title contains a " it breaks the input field
compare, <input id="title without quotes" />
and
<input id="title with " a quote." />
The last one will not work as expected.

There are several solutions: either escape the slashes, use a different key or replace the quote by its htmlentity.

Attached patch uses a key based not on the title, but on the node-id.

BTW, this is also broken in HEAD, but not in D5 (as far I can tell).

mike_r1977’s picture

Version: 6.4 » 6.5
Status: Needs review » Reviewed & tested by the community

The bug doesn't happen to me anymore after I installed the patch in #3. I'm not sure if I'm allowed to change the status of the patch since I'm the only one who seems to have tested it so far, so I apologize in advance if I shouldn't have.

maartenvg’s picture

Status: Reviewed & tested by the community » Needs review

A few more people need to review this before it's RTBC. No hard feelings though.

BTW, I recommend that someone with more core experience look at my solution. I'm not entirely sure that my solution is conform the coding standards.

maartenvg’s picture

Status: Needs review » Fixed

This has been fixed in the latest security update, 6.6.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.