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.
Steps to reproduce:
- Enable the book module.
- Place the book navigation block in a region by itself.
- Choose to have it show only when on book pages.
- Go to a page that is not a book page, like
/user/login
. - Inspect the page HTML and find that the region that the block was placed in renders, although it has no content in it, just the empty container.
It's pretty much invisible in Bartik, but in a theme where things were center justified instead of left justified, it would suddenly be apparent that something was wrong.
Comment | File | Size | Author |
---|---|---|---|
#23 | interdiff_2842839_18-23.txt | 2.09 KB | ankithashetty |
#23 | 2842839-23.patch | 1.03 KB | ankithashetty |
#19 | applying-patch.png | 68.69 KB | Madhu kumar |
#18 | 2842839-18.patch | 2.71 KB | Abhijith S |
#14 | Screen Shot 2020-07-27 at 5.34.39 AM.png | 391.14 KB | tanubansal |
Comments
Comment #6
lhguerra CreditAttribution: lhguerra at Taller commentedI reproduced this and it is really annoying, because it makes the check for the region in page template useless (the region will always have something inside, even with no navigation available). I think I'll have to make some context tweak for the block.
Comment #7
boromino CreditAttribution: boromino at LakeDrops commentedComment #8
boromino CreditAttribution: boromino at LakeDrops commentedComment #11
tanubansal CreditAttribution: tanubansal at Salsa Digital commentedTested on drupal 9.1
1. I have assigned 'Book navigation' block to Featured bottom first region
2. When checking on /user/login, it shows an empty container for that particular region
Can we get a patch for 9.1 as well?
Comment #12
tanubansal CreditAttribution: tanubansal at Salsa Digital commentedComment #13
boromino CreditAttribution: boromino at LakeDrops commented#8 works with 9.1.
Comment #14
tanubansal CreditAttribution: tanubansal at Salsa Digital commentedAfter adding latest patch mentioned in #8, issue is resolved in 9.1
Now, its not showing any books empty container
RTBC + 1
Comment #16
franzThe dependency injection of current_user service is irrelevant to the patch.
Comment #17
Abhijith S CreditAttribution: Abhijith S as a volunteer and at Zyxware Technologies commentedPatch #11 cant be applied on 9.2.x .Needs reroll
Comment #18
Abhijith S CreditAttribution: Abhijith S as a volunteer and at Zyxware Technologies commentedRerolled patch #11 for 9.2.x.Please check.
Comment #19
Madhu kumar CreditAttribution: Madhu kumar as a volunteer and at Zyxware Technologies commentedPatch #8 cant be applied , sharing screenshot for reference , Needs reroll for 9.2.x .
Comment #22
larowlanThis needs a reroll and #16 needs to be implemented
Also needs a test
Comment #23
ankithashettyRerolled the patch in #18 and also addressed #16, thanks!
Comment #24
Scott Weston CreditAttribution: Scott Weston at Bounteous commentedReviewed and tested #23. Working as expected.
Testing Steps I took:
* Clean install of latest Drupal core standard installation profile.
* Enabled Book module.
* Place book navigation block in "Featured Top" region (with no other blocks).
* Verified featured top region is not output.
* Added book and pages.
* Confirmed Book Navigation block output in the Featured Top region.
* Navigated to a non-book page, confirmed that the Featured Top region is not output.
RTBC +1
Comment #25
larowlanThanks folks, we still need a test here to demonstrate the bug.
The best place for this would be
\Drupal\Tests\book\Functional\BookTest
The test should basically repeat the steps outlined by @Scott Weston, thanks 💪
Comment #29
quietone CreditAttribution: quietone at PreviousNext 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.