Problem/Motivation
I have the book navigation block in the sidebar. On non-book pages where the navigation would be empty, it still produces some whitespace which makes the page template think there is a sidebar.
Steps to reproduce
Place book navigation block in sidebar, nothing else. Check markup output.
Proposed resolution
Don't produce whitespace content for empty block and/or don't consider whitespace content a sidebar in the page template.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3421433
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
mherchelThis is likely related to #953034: [meta] Themes improperly check renderable arrays when determining visibility. I wonder if within
region--sidebar.html.twig, if we change the{% if content %}to {% if content.0 %}, if that'd be a good enough fix. It seems to solve the problem on my local.Comment #4
gauravvvv commentedIf we change
{% if content %}to{% if content.0 %}then it doesn't display the aside region even if we add any block in aside region.Comment #5
gauravvvv commentedAlso, I printed the length of content in sidebar having Book navigation menu,
{{ content|length }}and the output is 215. It seems to be an issue with the block itself.Comment #6
gábor hojtsyMaybe its the book navigation block only. It adds the olivero book library (got it, library, haha?!) even if there was no content in the block.