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.

Comments

ratface created an issue. See original summary.

bamjam’s picture

Issue summary: View changes
bamjam’s picture

Issue summary: View changes
joelpittet’s picture

Version: 8.0.0-rc4 » 8.0.x-dev
Component: render system » theme system
Issue summary: View changes
Issue tags: +Twig

Moving to -dev branch to see if it can be fixed in a bug fix release and embeded picture in the IS

joelpittet’s picture

Status: Active » Postponed (maintainer needs more info)

@ratface is this still reproducible in the released version? I worked on fixing something that relates to this earlier this week.

bamjam’s picture

Status: Postponed (maintainer needs more info) » Active
FileSize
76.56 KB

@joelpittet yes I can still reproduce using 8.0.0. See screenshot attached.

joelpittet’s picture

I'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?

joelpittet’s picture

Is this patch resolving the issue?

Jeff Burnz’s picture

AFAICT it won't work, the problem is the placeholder for messages, no amount of rendering will fix this issue.

joelpittet’s picture

@Jeff Burnz what makes you say that? re #9

Jeff Burnz’s picture

Because 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.

joelpittet’s picture

Status: Needs review » Postponed

Oh I see the placeholders compound this issue, postponing on #953034: [meta] Themes improperly check renderable arrays when determining visibility

Cottser’s picture

Messages are complicated in general, see also this related issue.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.