Block visibility rules don't work properly

Created on 11 February 2022, about 3 years ago
Updated 16 February 2023, about 2 years ago

Problem/Motivation

Some block visibility rules don't work as expect

Steps to reproduce

Edit a block
In the 'Pages' tab, select 'Hide for the listed pages'
Add a aliases subpage pattern (eg, /mydoc/edit)
Go to that subpage, you will still see the block where it should be invisible

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom adam clarey

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.

  • 🇨🇦Canada nickdickinsonwilde Victoria, BC (T'So-uke lands)

    The challenge here is that block visibility uses the system path, with an extra check for a path alias. This has a some challenges and I think it should check the actual path as well. This module isn't the only one affected. For example, the *core* language module... /en/a won't hide a block on a node:1 with an alias of /a and a language of /en so you access it at /en/a. Nor in fact will /en/node/1 - you have to use either /a or /node/1.
    Given that, I think it is out of scope for this module to change that.

Production build 0.71.5 2024