'Tabs' block, when not accessible, still renders a region

Created on 13 August 2021, over 3 years ago
Updated 7 December 2023, about 1 year ago

Problem/Motivation

The 'tabs' block, when placed into a region on it's own, still triggers region visibility if the user has no permission to see/use.

Particularly noticeable if you have margining on the top of regions, which will generate unexpected white space. Note, this isn't reproduceable when there are other user visible blocks output in the region.

Steps to reproduce

'Zero' a region, and move the 'tabs' block into it. View the site as anon, and inspect the output:

White space and the pre-content region is delivered here even though the user doesn't have access to local tasks (tabs).

Proposed resolution

A quick win, is to trim the twig output in the page template:

{% if page.pre_content| %}
to
{% if page.pre_content|trim %}

Though this only deals with the issue at the very end of the 'chain', so it'd be nice to see if we can find when/how that presents further up.

Remaining tasks

Identify the culprit further up in the rendering of the page, or if more preferrable, just roll the template trim as a solution.

🐛 Bug report
Status

Closed: won't fix

Version

9.1

Component

Code

Created by

🇳🇿New Zealand chroid

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024