Follow up for #2027857-18: Blocks operations cannot be altered

Updated: Comment #0

Problem/Motivation

function hook_entity_operation_alter(array &$operations, \Drupal\Core\Entity\EntityInterface $entity) {}
was added in
#2004408-34: Allow modules to alter the result of EntityListController::getOperations

That hook was useful in #2004428: Less ugly operations altering

But, the hook did not effect some of the entities.
See #17-#24 in #2004428-17: Less ugly operations altering

In when fixing blocks, we started with just adding tests in block, then added tests for all entity lists into the Entity class, and then #2027857-18: Blocks operations cannot be altered took them out again as entity tests should not have to know what all the lists are.

Proposed resolution

Make a generic test in Entity that can be used in each entity test.

Remaining tasks

  • improve the wording of the issue summary
  • make initial patch

User interface changes

No.

API changes

No.

Comments

Gábor Hojtsy’s picture

Issue tags: -sprint

Blocks where we found the specific bug have a specific test and also RTBC. Looks to me like this is not being worked on and we have other things to focus on ATM.

benjy’s picture

Component: block.module » entity system

Moving this to entity since it's there that we want this generic test for reusing.

Xano’s picture

Is this still necessary after #2165725: Introduce hook_entity_operation() gets in?

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.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.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.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.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.