Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292981

Incorrect behaviour for block page visibility

$
0
0

Problem/Motivation

When leaving the "listed pages" text area empty in "Pages" block visibility, the options "Show for the listed pages" and "Hide for the listed pages" do the exact opposite of what they claim, they work as though there was an entry * in the list, i.e.:

  • Show for the listed pages will result in the block showing on all pages when the list is empty
  • Hide for the listed pages will result in the block showing nowhere when the list is empty

For an empty list, "Show on the listed pages" should not show the block anywhere. And, "Hide on the listed pages", should have the block show up on every page, when the list is empty.

Proposed resolution

Add a new radio button option for "Show on all pages", select this by default, hide the text area when this is selected, then validate that the box is not empty if either of the other two options are selected. See #19

One consideration is that the default currently causes the block to show everywhere, which in itself is probably a good default. It's just that it is being achieved by combining "Show on the listed pages" with an empty list, which at least caused me to select "Hide on the listed pages", expecting that to result in the block showing everywhere.

Another consideration is to ensure that the descriptive test (Not Restricted/Restricted to certain pages) in the Pages tab is correct.

Remaining tasks

  1. Decide on resolution
  2. Implement resolution
  3. code review
  4. add change record - suitable for a novice. There are instructions for adding a change record.

User interface changes

Before

After

API changes

None.


Viewing all articles
Browse latest Browse all 292981

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>