Top containers restricted to home page are not visible on block demo regions page

Created on 26 April 2025, 20 days ago

Problem/Motivation

When you select the top containers to be visible on the home page, they are not displayed on the block regions demo page.

I am not sure whether this can be prevented, creating an issue just to verify.

Steps to reproduce

Proposed resolution

Show all blocks on the demo page, despite visibility settings.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands edvanleeuwen Waalwijk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @edvanleeuwen
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States flashwebcenter Austin TX

    Hello,

    The three grouped regions Top, Bottom, and Footer, all behave the same way.
    When you place a block inside any of these regions, you will have three display options available under the theme settings for each grouped region:

    Display the block on all pages
    Display the block on the homepage only
    Display the block on all pages except the homepage

    Regarding your mention of "demo pages," I want to clarify that the theme does not include any demo pages.
    If other modules or themes create pages with their own blocks, they may not use the Solo page templates.
    To ensure Soloโ€™s settings are applied correctly, you must use the templates provided and shipped with the Solo theme.

    Best wishes,
    Alaa

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands edvanleeuwen Waalwijk

    Just to add: the demo page I was referring to is under /admin/structure/block/demo/solo

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States flashwebcenter Austin TX

    Hello,

    Thank you for providing the link /admin/structure/block/demo/solo.

    Please note that the block demo page (/admin/structure/block/demo/solo) is not a normal page request. It does not render the themeโ€™s page in the usual way. Instead, it uses a special internal controller that manually builds a fake page render array. It does not trigger real routes, such as the front page, content pages, or other standard site contexts.

    As a result, contextual conditions like is_front and site_regions_top_disable are missing or undefined when Drupal renders the block demo page. For example:

      {% if site_regions_top_disable == 0 %}
      {% include '@solo/partials/_top-regions.html.twig' %}
      {% endif %}
      {% if site_regions_top_disable == 1 and is_front %}
      {% include '@solo/partials/_top-regions.html.twig' %}
      {% endif %}
      {% if site_regions_top_disable == 2 and not is_front %}
      {% include '@solo/partials/_top-regions.html.twig' %}
      {% endif %}

    Because Drupal fakes the page to display only block regions (and not full site logic), theme settings, partial templates, and any dynamic Twig depending on context will not behave normally.

    Best wishes,
    Alaa

Production build 0.71.5 2024