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.
Reproduce:
Fresh install of rc4 and inspect the highlighted region with Bartik as the default theme.
Expected:
No output from Classy's region.html.twig
Actual:
An empty region wrapper.
Classy's region.html.twig is checking for region content using twig if which will evaluate whitespace as TRUE and as the highlighted region returns whitespace even when empty an empty region wrapper is output.
Edit: removing the Status messages block from the highlighted region results results in no region wrapper being printed.
Comment | File | Size | Author |
---|---|---|---|
#7 | empty_highlighted-2614954-7.patch | 668 bytes | joelpittet |
#6 | puush-linux+(2015-11-21+at+04.38.56).png | 76.56 KB | rattusrattus |
Screen+Shot+2015-11-13+at+16.19.44.png | 168.45 KB | rattusrattus |
Comments
Comment #2
rattusrattus CreditAttribution: rattusrattus commentedComment #3
rattusrattus CreditAttribution: rattusrattus commentedComment #4
joelpittetMoving to -dev branch to see if it can be fixed in a bug fix release and embeded picture in the IS
Comment #5
joelpittet@ratface is this still reproducible in the released version? I worked on fixing something that relates to this earlier this week.
Comment #6
rattusrattus CreditAttribution: rattusrattus commented@joelpittet yes I can still reproduce using 8.0.0. See screenshot attached.
Comment #7
joelpittetI'm quite sure this is a duplicate of a long standing issue #953034: [meta] Themes improperly check renderable arrays when determining visibility. Here's a patch though, let me know if it helps?
Comment #8
joelpittetIs this patch resolving the issue?
Comment #9
Jeff Burnz CreditAttribution: Jeff Burnz commentedAFAICT it won't work, the problem is the placeholder for messages, no amount of rendering will fix this issue.
Comment #10
joelpittet@Jeff Burnz what makes you say that? re #9
Comment #11
Jeff Burnz CreditAttribution: Jeff Burnz commentedBecause when you render a block that uses a placeholder, such as the messages block, there is output - it's not empty, so the region markup will print. This is the only issue now facing #953034: [meta] Themes improperly check renderable arrays when determining visibility but its a show stopper. Move the messages block to the sidebar second and you will see broken layout and the sidebar two region printing empty markup.
render the region in preprocess page and dsm it, you will see the placeholder.
I think we have to close this as a dupe, or postpone it until such time a good generic fix is found. We could use JS to remove empty makeup but that does not fix the broken layout classes Bartik sets in preprocess.
Comment #12
joelpittetOh I see the placeholders compound this issue, postponing on #953034: [meta] Themes improperly check renderable arrays when determining visibility
Comment #13
star-szrMessages are complicated in general, see also this related issue.