Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pfrenssen’s picture

Category: bug » task
Status: Active » Needs review
FileSize
2.07 KB

Simply used the default output of getOperations(). This causes the "configure" link to change to "edit".

andypost’s picture

Title: BlockListController doesn't call getOperations(). » BlockListController doesn't call parent::getOperations()
FileSize
1.15 KB
715 bytes
21.74 KB
18.99 KB

Currently this fixed but
at least configure should be default action, second patch trying to fix it properly

before
block-before.png

after
block-after.png

benjy’s picture

Status: Needs review » Needs work

+++ 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:

$operations['delete']['title'] = strtolower($operations['delete']['title']); // shouldn't need to run through t() either since the parent already did?

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?

tim.plunkett’s picture

Please 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.

tim.plunkett’s picture

Status: Needs work » Needs review
FileSize
1.48 KB

Block wrongly specifies status as an entity key. It does not need to, AFAIK.
This should be the correct fix.

webchick’s picture

Latest patch looks good to me, as long as bot likes it.

webchick’s picture

Title: BlockListController doesn't call parent::getOperations() » BlockListController doesn't call parent::getOperations() and so "delete" is the default dropbutton operation

Adding some more info to the title, closing #2055555: Change default operation at admin/structure/block to be edit as a dupe.

Dave Reid’s picture

Status: Needs review » Reviewed & tested by the community

Ran into this with D8 developer training. Tested and confirmed.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.