Problem/Motivation

By design the regions Page top and Page bottom are hidden from the Block UI (see https://www.drupal.org/project/drupal/issues/2639802) and other regions are also hidden by defaults on certain themes, (like First Sidebar on Claro and Seven). The problem is that they appear on the Context module's Blocks Reaction. Even if you add blocks to these regions, they do not appear, so it is not necessary to show them at all.

Steps to reproduce

Enable the Context module and create new context with a reaction "Blocks" - you will see Page top and Page bottom regions (Or First Sidebar, depending on your default theme). Try adding Powered by Drupal block in one of the regions, save and go to the page where the context should appear - the block will not be visible.

Proposed resolution

Unset these hidden blocks from the Blocks reaction.

Issue fork context-3273252

Command icon 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

yivanov created an issue. See original summary.

hmendes’s picture

Status: Active » Needs review
StatusFileSize
new635 bytes

Sending a patch, please review.

andregp’s picture

Status: Needs review » Needs work
StatusFileSize
new43.26 KB
new34.36 KB
new43.45 KB
new34.38 KB

@hmendes, Thanks for the patch. It worked fine for Bartik but had side-effects on Claro and Seven, both of them lost the "First sidebar" region after the patch was applied.

hmendes’s picture

Andre, thank you for the review.
I was wondering, the regions that now appears in both Claro and Seven (Bartic also) are the same regions that appears when you go to the Block Layout page (/admin/structure/block) when you have the themes enabled, so I understand that now it is correctly showing only the regions that the theme has... isn't it?

andregp’s picture

Issue summary: View changes
Status: Needs work » Reviewed & tested by the community

@hmendes, Oh, okay that makes sense. With further investigation I noticed that 'First Sidebar', or sidebar_first, is listed as a hidden region on both Claro and Seven info.yml files so makes sense they shouldn't appear among the Context Reaction regions.

I updated the IS accordingly and I'm moving this to RTBC.

Congrats :)

andregp’s picture

Title: Hide Page top and Page bottom system regions » Hide the default hidden system regions from the Contex Reaction regions list

Forgot to update issue tittle.

  • hmendes authored 57087a3 on 8.x-4.x
    Issue #3273252 by yivanov, hmendes, andregp: Hide the default hidden...
paulocs’s picture

Status: Reviewed & tested by the community » Fixed

Fixed! Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.