As you can see in issues such as #923934: Add support for OR in block visibility conditions and #361918: Change "Page specific visibility settings" in block configuration to more meaningful language., the UI for visibility settings for a block can confuse users. Some questions they may have and to which the UI doesn't provide any clue:

  1. What is the difference between "Pages" visibility settings and "Content types" ones? Aren't nodes supposed to be pages too? What if I'm on a page listing several nodes?
  2. Visibility settings are split in sections ("Pages", "Content types", "Roles", "Users") ; do the settings between these sections add up (AND filter) or are they independent from each other (OR filter)? If I set a path under "Pages" and I check a content type under "Content Types", will the block show on both the given path and node pages of this content type (many results), or will it show only if the given path is a node of the right content type (one result)?

In the first case, the help text in the "Content types" section should be more explanatory. Currently it is Show this block only on pages that display content of the given type(s)., which leaves a doubt about some pages (will the block display on a page listing blog posts teasers, because it displays content of the given type?).

In the second case, it could be useful to add a short help text just below the "Visibility settings" label, such as "The block will only be visible if all the conditions below are met".

CommentFileSizeAuthor
#1 block_visibility_ui-0-D7.patch1.34 KBmdupont
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mdupont’s picture

Status: Active » Needs review
FileSize
1.34 KB

Having a quick go at a patch.

mdupont’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: -#d7ux +Usability

Bumping to 8.x-dev. The patch is small and contains a more meaningful rewording of some descriptions.

kscheirer’s picture

Issue tags: -Usability

#1: block_visibility_ui-0-D7.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Usability

The last submitted patch, block_visibility_ui-0-D7.patch, failed testing.

komlenic’s picture

Would it be beneficial to add a toggle so that block visibility settings can be either match all [logical AND] (the current behavior) or match any [logical OR]?

I have encountered several situations where a "match any" situation would be desirable, and judging from several issues and threads, it is a need that currently seems to require php filter and custom code, or several other modules to achieve.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

darvanen’s picture

Discussed in Bug Smash Initiative triage meeting.

Point 1 is a duplicate of [#32301625] and #2451461: Hide/show block page visibility negate form element if pages form element is/is not empty.

Point 2 is a duplicate of #923934: Add support for OR in block visibility conditions.

Though this issue is older than those referenced by point 1 it contains more than one concept, so opting to close this in favour of more focussed issues.