- Issue created by @joachim
If an entity list builder using DraggableListBuilder / DraggableListBuilderTrait doesn't add anything to its rows, or adds them in the wrong order, the whole thing breaks and the drag handles don't show.
1. Ensure there are at least 2 vocabularies
2. Comment out \Drupal\taxonomy\VocabularyListBuilder::buildRow()
3. Go to admin/structure/taxonomy
There are no drag handles!
Further investigation: in Drupal\Core\Entity\DraggableListBuilderTrait::buildRow() add a cell after the weight:
$row['cell'] = [
'#markup' => 'A CELL',
];
Reload and the table is still broken.
Now move the cell so it comes BEFORE the weight cell, and it works!
It seems that whatever is adding the drag handles is very particular about what it needs, and needs a cell that is NOT the entity operations to come first (but what's wrong with the operations that it doesn't like??)
This should:
a. Be documented on the trait
b. There should be some sort of warning to tell developers what they've done wrong