- Status changed to RTBC
18 days ago 2:26pm 10 April 2025 - π¦πΉAustria klausi π¦πΉ Vienna
Thanks, looks good! Uploading stable patch file for composer patches.
If the first column in the views table contains output that uses a lazy builder () the placeholders are never rendered. This can result in a scenario where content that is displayed in the column normally gets broken when the draggableviews field is added to the table.
Current behavior - the output here is a teaser with flag links added to the view mode, but the flag links are not displayed:
Desired behavior - flag links are displayed:
- Install Flag module, create a flag, add it to a node, and display the flag field as part of a node's teaser view mode
- Create a new draggable views view where the first column in the table is a "Content: Rendered entity" field that renders the node using the teaser view (which has the flag configured to display)
Example:
The table will show correctly, but the flag/unflag links will not show in the node's teaser. This is because the Flag module uses lazy builders to add flag links to the page. But, the code in draggableviews_preprocess_views_view_table()
makes modifications to the render array that breaks the lazy builders and the flag links are never displayed.
When draggableviews_preprocess_views_view_table()
alters the views table and adds an indent to the first column in the table it breaks the render array. It changes $variables['rows'][$key]['columns'][$first_column]['content'][0]['field_output']['#markup']
from a \Drupal\views\Render\ViewsRenderPipelineMarkup
object to a string. Instead of calling render()
to create a string and then using that string, we should instead add the indentation as a normal render array element that is a sibling of the 'field_output' element with a weight of something like -100 so that it renders first.
This will avoid using the call to render();
and allow the normal rendering pipeline to do it's job and ensure lazy builders / placeholders work.
Needs review
2.1
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Thanks, looks good! Uploading stable patch file for composer patches.