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]
| Comment | File | Size | Author |
|---|---|---|---|
| #68 | d11-test.png | 128.02 KB | dreambubbler |
| #38 | interdiff-32-38.txt | 1.72 KB | nitin_lama |
| #38 | 2789241-38.patch | 1.31 KB | nitin_lama |
| #38 | block_type.png | 41.83 KB | nitin_lama |
| #38 | block_role.png | 47.24 KB | nitin_lama |
Issue fork drupal-2789241
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
Comment #2
swaps commentedAttached patch should add proposed help text.
Cheers,
SwapS
Comment #3
swaps commentedComment #8
ethomas08 commentedRe-rolled patch in comment #2 for Drupal 8.6.x
see file uploaded called: 2789241-block-config-form-user-msg-8.6.x.patch
Comment #9
Anonymous (not verified) commentedThere 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');Comment #10
ethomas08 commentedDo you mean this should have a period? "Allow individual users to customize the visibility of this block in their account settings"
Comment #11
ethomas08 commentedRe-rolled for 8.7.x WITH period at the end
Comment #12
ethomas08 commentedI think I jumped the gun. Here is the patch for v8.6.x WITH period
Comment #13
mikelutzComment #14
ethomas08 commentedSubmitting re-roll after issue version was updated to current development branch
Comment #15
ethomas08 commentedI'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.
Comment #16
ethomas08 commentedComment #17
nickdickinsonwildeThanks for all the re-rolling Elissa
The second description
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.Comment #18
ethomas08 commentedUploading re-rolled patch for 8.7.x with more specific wording
Comment #19
ethomas08 commentedComment #20
nickdickinsonwildeLooks 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.
Comment #21
lauriiiComment #22
gábor hojtsyHm 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)".
Comment #23
ethomas08 commentedGood 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."
Comment #31
larowlanComment #32
pooja saraah commentedAttached reroll against #18 #23
Comment #33
pooja saraah commentedComment #34
ankithashettyComment #35
smustgrave commentedTested out and there is no description appearing for content type.
Comment #37
nitin_lamaComment #38
nitin_lamaPatch for 10.1.x. Please review.
Comment #39
smustgrave commentedThis still needs an issue summary update per #31 please.
Comment #40
nitin_lamaComment #42
laurielim commentedComment #43
needs-review-queue-bot commentedThe 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.)
Comment #44
nitin_lamaComment #49
nitin_lamaComment #50
mradcliffeI 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.
Comment #51
farnoosh commentedremoving my comment
Comment #52
farnoosh commentedFirst step is to rebase the patch against Drupal 11
Comment #54
liberatrAttempted re-roll against latest dev and pushed to issue fork.
Comment #55
atul_ghate commentedComment #57
atul_ghate commentedI 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.
Comment #58
smustgrave commentedPlease look at the tags before putting into review. Appears to be a reroll
Comment #59
brandonlira commentedComment #60
brandonlira commentedComment #61
szzoltan commentedFirst time contributors, update-in the issue with patricia_1
Comment #62
szzoltan commentedProblem/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]
Comment #63
szzoltan commentedUpdated issue summary
Comment #65
xjmThanks for your work on this issue.
So the issue summary update did not really happen here:
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!
Comment #66
xjmComment #67
dreambubbler commentedHello from DrupalCon Nara! I'll be reviewing this issue today. This is my first time contributing.
Comment #68
dreambubbler commentedWhen 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?
Comment #69
akmalfikri commentedI confirmed #68 is also appears in my view as well.