What are the steps required to reproduce the bug?
- Install a new Drupal 8.4 site and enable book module.
- Create a book
- Create 3 pages in this hierarhy:
- Remove the parent element from the outline (on my image the Page 1)
What behavior were you expecting?
I think if you delete a parent, move the child one deph up. So it shoud be look like this:
Book
- Page 1.1
- Page 2
What happened instead?
Here are the images from the book (root) and the pages:
But the page 1.1:
Broken navigation, it's not under the book only from the current page, so deleted parent's child will be lost, and buggy.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | drupal-missing_children-2945824-16.patch | 2.64 KB | matthijs |
| book.JPG | 23.86 KB | golddragon007 | |
| page-2.JPG | 20.74 KB | golddragon007 | |
| page-1-1.JPG | 28.72 KB | golddragon007 | |
| page-1.JPG | 16.84 KB | golddragon007 |
Issue fork book-2945824
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
golddragon007 commentedThis patch will connect deleted parent's child with the parent's parent.
Comment #3
golddragon007 commentedComment #4
borisson_Great catch! This is indeed behavior that's really unexpected. We should add tests for this to make sure we document the correct behavior.
Comment #5
mohit_aghera commentedAdding method to test outline.
For now I am testing outline by adding one content to outline and then removing it's parent from outline.
Comment #9
abhishek-anand commentedRerolling the patch for Drupal 8.7
Comment #16
matthijsFixed usage of entityManager, which no longer exists in Drupal 9.
Comment #19
quietone commentedThis extension is being deprecated, see #3376070: [Meta] Tasks to deprecate Book module. It will be removed from core and moved to a contrib project, #3376101: [11.x] [Meta] Tasks to remove Book.
This is now Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
This issue may be re-opened if it can be considered critical, If unsure, re-open the issue and ask in a comment.
Comment #20
smustgrave commentedComment #21
smustgrave commentedComment #24
smustgrave commented