Problem/Motivation

Visibility controls in Blocks configurations are missing from help text in Drupal 8 .

Steps to reproduce

Blocks can be found at "/admin/structure/block"

Proposed resolution

Insert help text the same way as it was in Drupal 7 for Content Type and Roles.

Remaining tasks

Change code that inserts the "Help text"

Original report by [SwapS]

Issue fork drupal-2789241

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

SwapS created an issue. See original summary.

swaps’s picture

Attached patch should add proposed help text.

Cheers,
SwapS

swaps’s picture

Component: plugin system » block.module
Status: Active » Needs review

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.

ethomas08’s picture

Re-rolled patch in comment #2 for Drupal 8.6.x
see file uploaded called: 2789241-block-config-form-user-msg-8.6.x.patch

Anonymous’s picture

Assigned: swaps » Unassigned
Status: Needs review » Needs work

There is no dot at the end:

+ $form['user_role']['roles']['#description'] = $this->t('Allow individual users to customize the visibility of this block in their account settings');

ethomas08’s picture

Do you mean this should have a period? "Allow individual users to customize the visibility of this block in their account settings"

ethomas08’s picture

Re-rolled for 8.7.x WITH period at the end

ethomas08’s picture

I think I jumped the gun. Here is the patch for v8.6.x WITH period

mikelutz’s picture

Version: 8.6.x-dev » 8.7.x-dev
ethomas08’s picture

Submitting re-roll after issue version was updated to current development branch

ethomas08’s picture

I'll try one last time! I got an error when I tried to test the other patch that said "file corrupted" so something was screwed up. This one was able to apply cleanly.

ethomas08’s picture

Status: Needs work » Needs review
nickdickinsonwilde’s picture

Status: Needs review » Needs work

Thanks for all the re-rolling Elissa
The second description

-      unset($form['user_role']['roles']['#description']);
+      $form['user_role']['roles']['#description'] = $this->t('Allow individual users to customize the visibility of this block in their account settings.');

is unfortunately quite wrong.
How about:
Show block only if the user has at least one of the selected roles. No roles being selected will show to all users.

ethomas08’s picture

Uploading re-rolled patch for 8.7.x with more specific wording

ethomas08’s picture

Status: Needs work » Needs review
nickdickinsonwilde’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me
Quick note, when you upload a patch, you can set the status to needs review that will automatically trigger the test bot and if the test fails will automatically set it back to needs work - and even better it is clear from issue queue lists what the issues status is, without having to go back to it after the test succeeds.

lauriii’s picture

Issue tags: +Usability
gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

Hm the content type one sounds odd. Based on the text it would apply to a views page that displays at least one of those types which is not true, is it? AFAIK it would apply to a page that displays a single node of one of those content types. Am I mistaken here?

Also if you can avoid the "(s)" that would be best. Like in the second description by wording it slightly differently, no need for an "(s)".

ethomas08’s picture

Good correction! How about:

"Show this block only if the node is of the selected content type. If you select no types, there will be no type-specific limitation."

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

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.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.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). 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.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now 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.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

larowlan’s picture

pooja saraah’s picture

StatusFileSize
new1.5 KB
new1.69 KB

Attached reroll against #18 #23

pooja saraah’s picture

Status: Needs work » Needs review
ankithashetty’s picture

Issue tags: -Needs reroll
smustgrave’s picture

Status: Needs review » Needs work

Tested out and there is no description appearing for content type.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

nitin_lama’s picture

Assigned: Unassigned » nitin_lama
nitin_lama’s picture

Assigned: nitin_lama » Unassigned
Status: Needs work » Needs review
StatusFileSize
new47.24 KB
new41.83 KB
new1.31 KB
new1.72 KB

Patch for 10.1.x. Please review.

no_image


no_image
smustgrave’s picture

Status: Needs review » Needs work

This still needs an issue summary update per #31 please.

nitin_lama’s picture

Issue summary: View changes

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

laurielim’s picture

Status: Needs work » Needs review
Issue tags: -Needs issue summary update
needs-review-queue-bot’s picture

Status: Needs review » Needs work

The Needs Review Queue Bot tested this issue.

While you are making the above changes, we recommend that you convert this patch to a merge request. Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)

nitin_lama’s picture

Assigned: Unassigned » nitin_lama

nitin_lama changed the visibility of the branch 2789241-usability-issue-- to active.

nitin_lama changed the visibility of the branch 2789241-usability-issue-- to hidden.

nitin_lama’s picture

Assigned: nitin_lama » Unassigned
mradcliffe’s picture

I performed Novice Triage on this issue. I am leaving the Novice tag on this issue because there is a clear path forward after updating the issue summary. Because this is a regression from Drupal 7, perhaps we should also add a simple test for description so I added the Needs tests tag.

Novice issue reserved for the Mentored Contribution during the DrupalCon Portland 2024 contribution day. After 2024.05.08, this issue returns to being open to all. Thanks
farnoosh’s picture

removing my comment

farnoosh’s picture

First step is to rebase the patch against Drupal 11

liberatr made their first commit to this issue’s fork.

liberatr’s picture

Attempted re-roll against latest dev and pushed to issue fork.

atul_ghate’s picture

Assigned: Unassigned » atul_ghate

atul_ghate’s picture

Assigned: atul_ghate » Unassigned
Status: Needs work » Needs review

I have rerolled the patch for Drupal 11.x. Please review it. Since I'm not familiar with writing tests, issue is open for adding tests and other relevant tags.

smustgrave’s picture

Status: Needs review » Needs work

Please look at the tags before putting into review. Appears to be a reroll

brandonlira’s picture

Assigned: Unassigned » brandonlira
brandonlira’s picture

Assigned: brandonlira » Unassigned
szzoltan’s picture

Issue tags: +Vienna2025

First time contributors, update-in the issue with patricia_1

szzoltan’s picture

Problem/Motivation

Visibility controls in Blocks configurations are missing from help text in Drupal 8 .

Steps to reproduce

Blocks can be found at "/admin/structure/block"

Proposed resolution

Insert help text the same way as it was in Drupal 7 for Content Type and Roles.

Remaining tasks

Change code that inserts the "Help text"

Original report by [SwapS]

szzoltan’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update

Updated issue summary

xjm changed the visibility of the branch 11.x to hidden.

xjm’s picture

Issue tags: +Needs issue summary update, +Needs manual testing, +NEeds screenshot, +Nara2025

Thanks for your work on this issue.

So the issue summary update did not really happen here:

  • It needs to be in the issue summary field, not a comment.
  • It needs to specifically describe what the problem is, and how to fix. Currently, it's very vague. This issue is apparently a regression, so we should detail specifically what the regression is.
  • Look at the screenshots in #8. In this case, a screenshot is perhaps worth 1000 words, or at least 100? If HEAD does not look like that, and it is desirable to have that help text, then we should update the Issue Summary's "User interface" section with "Before" and "After" subheaders that show HEAD without those descriptions and the merge request with it.

If we determine that is the case, then we need an automated test so that this will not regress again.

Thanks everyone!

The Drupal Contribution Mentoring team is triaging issues for DrupalCon Nara 2025, and we are reserving this issue for Mentored Contribution during the event.

After November 19, this issue returns to being open to all. Thanks!

xjm’s picture

Issue tags: -NEeds screenshot +Needs screenshots
dreambubbler’s picture

Hello from DrupalCon Nara! I'll be reviewing this issue today. This is my first time contributing.

dreambubbler’s picture

StatusFileSize
new128.02 KB

When I checked this issue, it had already been fixed in Drupal 11.x.
This text appears Show this block only if the user has at least one of the selected roles. If you select no roles, the block will show to all users. after a fresh install. Please see the screenshot.

Can I have another tester verify?

akmalfikri’s picture

I confirmed #68 is also appears in my view as well.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.