Problem/Motivation

Label to display is check_plain'ed in #2019071: EntityListController::buildRow() should return secure label so all implementations needs clean-up

Proposed resolution

Use parent::buildRow() in all places to prepare #1855402: Add generic weighting (tabledrag) support for config entities (DraggableListController)

API changes

no, just clean-up

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

Issue tags: +Novice

taggin

tsphethean’s picture

Assigned: Unassigned » tsphethean
tsphethean’s picture

tsphethean’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, entitylistcontroller_parent_buildrow-2027117-3.patch, failed testing.

tim.plunkett’s picture

This is pretty much the opposite of #2064557: Improve strange coupling in EntityListControllers by improving buildRow() and buildHeader().
We should be making buildOperations() easier to use instead, and make the new tabledrag easy to opt-into as well, not move more magic into the parent.

tim.plunkett’s picture

Status: Needs work » Closed (duplicate)
  1. +++ b/core/modules/action/lib/Drupal/action/ActionListController.php
    @@ -85,11 +85,10 @@ public function load() {
    -    if ($this->hasConfigurableActions) {
    -      $row['operations']['data'] = $this->buildOperations($entity);
    

    This is just wrong.

  2. +++ b/core/modules/contact/lib/Drupal/contact/CategoryListController.php
    @@ -58,7 +58,9 @@ public function buildHeader() {
    +    $row['category'] = $row['label'];
    

    Now the label will show up twice

The intention of this issue is to ensure that the checkPlain that was added isn't missed, as well as allowing further upstream improvements to buildRow to happen.

#2064557: Improve strange coupling in EntityListControllers by improving buildRow() and buildHeader() accomplishes both of those things, without causing further DX issues or making it easier to have malformed tables.
As such, I'm marking this one as a duplicate.