Deleting a paragraph then expanding/collapsing field causes blank row to appear

Created on 24 June 2025, about 1 month ago

Problem/Motivation

If you have a field that uses the ParagraphsWidget with multiple paragraphs populated, and you delete one of those paragraphs then click the Collapse All or Edit All button, a blank row appears in the field table. No paragraph type, summary, or operation buttons are shown, just the drag and drop handle.

Similar to 🐛 Deleted Paragraphs visible in drag & drop Needs work , but occurs in the normal field mode (i.e., the standard Claro tabledrag), not Paragraph's Drag-and-Drop mode.

Steps to reproduce

  1. Create a paragraph type.
  2. Create a content type with a Paragraphs field that allows that paragraph type, unlimited cardinality.
  3. Set the Form Display for that field to the Paragraphs (Stable) widget, and allow Collapse / Edit all in the widget settings.
  4. Create a node of the test content type, add three paragraphs to the field, and save the node.
  5. Edit the node, click Remove on the third paragraph, then click Collapse All on the field.

Expected result: The field shows the two remaining paragraphs in collapsed mode.

Actual result: A third, blank row appears in the field. This row contains no data and no operation buttons, but can be dragged to reorder.

Workaround: If you save the node and edit it again, the blank row is gone.

🐛 Bug report
Status

Active

Version

1.19

Component

User interface

Created by

🇺🇸United States muriqui

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @muriqui
  • 🇦🇲Armenia hhvardan

    I've created a MR that fixes this behavior.
    Instead of using `#max_delta` directly, the patch scans for the last visible paragraph delta and uses that for AJAX effects. This avoids injecting markup around an item that won't render.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 458s
    #531082
  • Pipeline finished with Failed
    about 1 month ago
    Total: 304s
    #531263
  • 🇮🇳India roshanibhangale

    Hi

    I have tested this ticket on Drupal 10

    Steps Followed

    • Create a paragraph type.
    • Create a content type with a Paragraphs field that allows that paragraph type, unlimited cardinality.
    • Set the Form Display for that field to the Paragraphs (Stable) widget, and allow Collapse / Edit all in the widget settings.
    • Create a node of the test content type, add three paragraphs to the field, and save the node.
    • Edit the node, click Remove on the third paragraph, then click Collapse All on the field.

    After applying MR192 Patch successfully, Observed that the field shows the two remaining paragraphs in collapsed mode.
    The blank row is not showing now on editing the node.

    Hence moving this ticket to RTBC +1

    Adding recording for reference.

Production build 0.71.5 2024