Problem/Motivation
Initially this issue was about changing the label of the contextual (delete) link to match the label in block-layout (remove). In fact the link in contextual links actually deletes the block and all of it's instanaces. This is too destructive an action to expose in a contextual link, since users are likely to think they are only removing a single instance when they are in fact removing all instances and any associated content.
Proposed resolution
Remove the 'delete' contextual link from blocks.
Remaining tasks
Create patch
User interface changes
There will be no 'delete' link on blocks.
API changes
?
Data model changes
?
Comment | File | Size | Author |
---|---|---|---|
#46 | 2826728-block_content-46.patch | 573 bytes | tim.plunkett |
#42 | block_content_links_patch-38.patch | 6.73 KB | tim.clifford |
#37 | Screenshot from 2017-01-13 10-17-41.png | 12.16 KB | tim.clifford |
#31 | block_content_links_patch-31.patch | 8.63 KB | tim.clifford |
#27 | Screenshot from 2017-01-11 16-31-24.png | 45.69 KB | tim.clifford |
Comments
Comment #2
laxman.ghavte CreditAttribution: laxman.ghavte as a volunteer and at Faichi Solutions Pvt Ltd for Faichi Solutions Pvt Ltd commentedComment #3
tkoleary CreditAttribution: tkoleary at Acquia commentedComment #4
tkoleary CreditAttribution: tkoleary at Acquia commentedComment #5
tkoleary CreditAttribution: tkoleary at Acquia commentedComment #6
tim.plunkettNeeds a patch.
Comment #7
dmezquiaComment #8
tim.plunkettIMO those were relevant
Comment #9
shubhang CreditAttribution: shubhang as a volunteer commentedAs this issue has a "Novice" tag, so can you be a little more descriptive of where this change needs to be made.
I am a begginer and really wants to contribute to Drupal.
Comment #10
tkoleary CreditAttribution: tkoleary at Acquia commentedThe file that needs to be changed is core/modules/block_content/block_content.links.contextual.yml
Comment #11
Ada Hernandez CreditAttribution: Ada Hernandez at MTech, LLC commentedComment #12
Ada Hernandez CreditAttribution: Ada Hernandez at MTech, LLC commentedComment #13
tkoleary CreditAttribution: tkoleary at Acquia commentedLooks good.
Note: the image above shows two "quick edit" links, that's being addressed in another issue.
Comment #15
Thew CreditAttribution: Thew at Google Code-In commentedPatch passed.
Comment #17
lomasr CreditAttribution: lomasr at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedApplied the patch in #11 . Worked cleanly for me. Please see the screens.
Comment #18
boosmith CreditAttribution: boosmith as a volunteer commentedI'm looking to test this but I am not sure exactly which URL this is in Drupal as I can't reproduce the screenshots attached. Thanks
Comment #19
tkoleary CreditAttribution: tkoleary at Acquia commented@boosmith
Best way to test it is to:
The reason for steps 7-13 is that system created blocks that are on the page by default do not have 'remove' (or delete) links.
Comment #20
boosmith CreditAttribution: boosmith as a volunteer commentedThanks tkleary. I followed the steps in #19 and it passed testing.
Screen Shot 2017-01-10 at 20.43.12.png
Comment #21
utkarsh_malviya CreditAttribution: utkarsh_malviya as a volunteer commentedAfter we click on the remove link the next page still shows delete.
Comment #22
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedCan confirm patch #11 works against core 8.3.x but the next page does still say delete (#21)
Comment #23
utkarsh_malviya CreditAttribution: utkarsh_malviya as a volunteer commented@tkoleary can you help me solve this? I am new here.
Comment #24
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedChanged contextual link and button on following page.
Comment #25
utkarsh_malviya CreditAttribution: utkarsh_malviya as a volunteer commented@tim.clifford the button on the next page also says delete!
Comment #26
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedAs utkarsh_malviya points out, the form submit button label needs to be updated as well. Patch #26 updates both the contextual filter and the delete button label. I have also added a space in between sentences for the message.
Comment #27
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedTested on 8.3.x and seems to be working fine.
Comment #28
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedComment #30
tim.plunkettExcept the big bold title says "delete" and the rest of the words say "remove"
Comment #31
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedUpdating test and re-applying patch.
Comment #32
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedComment #34
tim.plunkettWhy this change?
Also
PHP Parse error: syntax error, unexpected ')' in /var/www/html/core/modules/block_content/src/Tests/BlockContentListViewsTest.php on line 106
Comment #35
tkoleary CreditAttribution: tkoleary at Acquia commented@tim.plunkett
looks like it adds a space after "instances. "
Comment #36
tim.plunkettYes I can see *what* it is doing, I asked *why* :)
Comment #37
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedSpace was added as sentence that followed started immediately after the '.'
Comment #38
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedSyntax error fix. Removed the space as mentioned above.
Comment #39
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedComment #41
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedComment #42
tim.clifford CreditAttribution: tim.clifford at Investis Digital commentedComment #43
tim.plunkett@tim.clifford can you include interdiffs for your changes from now on? Thanks!
https://www.drupal.org/documentation/git/interdiff
Comment #44
tim.plunkettAfter trying to debug #2839558: Blocks do not have a "remove" contextual link, I realized that all of these changes are wrong.
None of these will just remove that placed block, they will delete the block content entity and ALL placements of the block. It is a destructive deletion of user-entered content, not a easily reversible configuration change.
Either this is won't fix, or the issue needs more clarification.
Not quite :)
Comment #45
tkoleary CreditAttribution: tkoleary at Acquia commentedComment #46
tim.plunkettComment #47
larowlan+1 to just remove
Comment #49
rosschive CreditAttribution: rosschive commentedTaking a look as part of Global Sprint Weekend (Boston)...
I created 8.4.x sandbox with patch 46 (via simplytest.me). Verifying that following the placement of a custom block, the contextual editor options do not contain either a 'Remove' or 'Delete' option (see screenshot).
Comment #53
webchickCommitted and pushed to 8.4.x and backported to 8.3.x. Thanks!
Comment #54
xjm