Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
BlockListController hard-codes its operations in getOperations().
Comment | File | Size | Author |
---|---|---|---|
#5 | block-1995046-5.patch | 1.48 KB | tim.plunkett |
#2 | block-before.png | 18.99 KB | andypost |
#2 | block-after.png | 21.74 KB | andypost |
#2 | 1995046-block-config-2-order.patch | 715 bytes | andypost |
#2 | 1995046-block-config-2-parent.patch | 1.15 KB | andypost |
Comments
Comment #1
pfrenssenSimply used the default output of getOperations(). This causes the "configure" link to change to "edit".
Comment #2
andypostCurrently this fixed but
at least configure should be default action, second patch trying to fix it properly
before
after
Comment #3
benjy CreditAttribution: benjy commented+++ b/core/modules/block/lib/Drupal/block/BlockListController.phpundefined
@@ -268,18 +268,22 @@ public function buildForm(array $form, array &$form_state) {
+ $operations['delete']['title'] = t('delete');
Would this be better with:
At first I was wondering why you were overwriting the title, the strtolower() seems to make it clearer. Or we could add a comment saying that all operations are lowercase in the operations drop down?.
Secondly, theoretically the parent may change the title, wouldn't we want that to flow through?
I also opened another issue yesterday #2055555: Change default operation at admin/structure/block to be edit for the operations order before I new this existed. We can use that issue for the second patch?
Comment #4
tim.plunkettPlease just uncaps them. We need to do it, now might as well be the time. Sure it will take test fixes, but it needs to be done.
Comment #5
tim.plunkettBlock wrongly specifies status as an entity key. It does not need to, AFAIK.
This should be the correct fix.
Comment #6
webchickLatest patch looks good to me, as long as bot likes it.
Comment #7
webchickAdding some more info to the title, closing #2055555: Change default operation at admin/structure/block to be edit as a dupe.
Comment #8
Dave ReidRan into this with D8 developer training. Tested and confirmed.
Comment #9
webchickCommitted and pushed to 8.x. Thanks!
Comment #10.0
(not verified) CreditAttribution: commentedUpdated issue summary.