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.
I have a view with displaying nodes using the table formatter. I added the weight selector field and the table has draggable rows. But the actual select element is missing. instead this is being displayed:
<!--form-item-field_weight--0-->
The functionality is broken since the values are not stored after sorting.
Comment | File | Size | Author |
---|---|---|---|
#4 | weight-show-selector-2671840-4.patch | 985 bytes | jlicht |
Comments
Comment #2
fictionindustries CreditAttribution: fictionindustries commentedSame problem here. Without the weightselector everything works just fine. Once I add the weight selector to the table I get the same output and this error as well:
Deprecated function: Non-static method Drupal\weight\Plugin\Field\FieldWidget\WeightSelectorWidget::rangeOptions() should not be called statically, assuming $this from incompatible context in Drupal\weight\Plugin\views\field\WeightSelector->viewsForm() (line 66 of modules/contrib/weight/src/Plugin/views/field/WeightSelector.php).
Comment #3
Lukas von BlarerWere you able to solve this in the meantime?
Comment #4
jlicht CreditAttribution: jlicht commentedThe problem is that the markup for the selector row was being escaped. Here's a patch that uses ViewsRenderPipelineMarkup to fix this.
Comment #5
Lukas von BlarerThis patch fixes the issue of the missing selects. RTBC
Something seems to be broken with the tabledrag. The handles are hidden. But lets create a follow up for this.
Comment #6
Lukas von BlarerHere is the follow-up: #2689377: Tabledrag handles are hidden
Comment #7
morsokWorks for me too, thank you !
Comment #8
davisbenThanks for the patch. Committed to 8.x-3.x.