If this field is left blank the block should not appear on any page. In both D5 and D6, leaving this field blank will display the block on every page.

I think the results should be that the page is not displayed anyplace.

Thank You
Emery Gordon

Comments

stevenpatz’s picture

Priority: Critical » Normal
sonobor’s picture

Agreed. Does inserting "none" do the trick?

Or does that cause some sort of error?

escoles’s picture

Version: 6.2 » 6.14

inserting any string which matches no path (e.g. "x") will cause the block to not be displayed. "<none>" will also work.

However, this should not be necessary. This is clearly a bug. The system is behaving in precisely the opposite manner that its settings indicate that it should.

This behavior seems to indicate that what's happening is the field is just never checked if it's empty.

I've just verified that this behavior occurs on both 6.9 and 6.14. I'm updating the version to 6.14, since it's still present.

escoles’s picture

Title: Show only on the listed pages » Blocks are shown on all pages if "Show only on the listed pages" is selected and no page specified

Changing title to make more descriptive.

mr.baileys’s picture

Version: 6.14 » 7.x-dev

Marked #739486: Block visibility as a duplicate. The same issue applies to 7.x-dev, so will need to be fixed there first and then backported.

mr.baileys’s picture

Title: Blocks are shown on all pages if "Show only on the listed pages" is selected and no page specified » Blocks are incorrectly shown when "pages" is left blank.
Status: Active » Needs review
StatusFileSize
new679 bytes

This also applies to the PHP visibility setting: if you select "Pages on which this PHP code returns TRUE (experts only) " and leave the text area empty, the block will be shown on all pages. This contradicts the UI text and is confusing...

mr.baileys’s picture

StatusFileSize
new2.84 KB

Added a test.

casey’s picture

Status: Needs review » Needs work

Needs a reroll.

jody lynn’s picture

Status: Needs work » Needs review
StatusFileSize
new1.76 KB

Rerolled to remove bits of the test patch already committed.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.