Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I attach a new page node to an outline (either root level or an existing one) there is no "Remove from outline" button and the node can not be removed from the outline. There is only an "Add to book outline" button.
The node cannot be moved to another parent either. The "Add to book outline" button works only the first time. It produces an error if you try to change to another parent.
user warning: Duplicate entry '4' for key 1 query: INSERT INTO enp_book (nid, vid, parent, weight) VALUES (4, 4, 0, 0) in [...]/public_html/drupal-4.7/includes/database.mysql.inc on line 120.
Comment | File | Size | Author |
---|---|---|---|
#2 | 54565_book_outline.patch | 743 bytes | Zen |
Comments
Comment #1
cog.rusty CreditAttribution: cog.rusty commentedI am pasting the error message again without the pre tags.
user warning: Duplicate entry '5' for key 1 query: INSERT INTO enp_book (nid, vid, parent, weight) VALUES (5, 5, 4, 0) in [...]/public_html/drupal-4.7/includes/database.mysql.inc on line 120.
Comment #2
Zen CreditAttribution: Zen commentedOne liner. This is also (surprisingly) the only place where book_load is called. Setting to RTC as a result.
Cheers
-K
Comment #3
Zen CreditAttribution: Zen commentedTo clarify:
The
if ($page->nid)
was failing as $page is never loaded with the nid by the call to book_load (and its erroneous query).-K
Comment #4
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedapplied
Comment #5
Zen CreditAttribution: Zen commented