Deleted Paragraphs visible in drag & drop

Created on 29 August 2017, about 7 years ago
Updated 10 August 2023, over 1 year ago

Problem/Motivation

If i click delete on a Paragraph, it is then visible as a first item in drag & drop mode.

Proposed resolution

Hide it in drag & drop mode.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs work

Version

1.0

Component

User interface

Created by

🇨🇭Switzerland miro_dietiker Switzerland

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇷🇴Romania bogdan.dinu

    The getChildParagraphs method in src/Plugin/Field/FieldWidget/ParagraphsWidget.php reconstructs the paragraphs from the form state storage but it doesn't take into account deleted paragraphs.
    I added a simple check to fix the issue.

    I changed the issue priority to major because clicking "Complete drag & drop" will restore the deleted paragraph which creates data inconsistency.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Patch Failed to Apply
  • 🇦🇺Australia paulabg

    While debugging the patch mentioned in comment #2, I discovered that the value of $child_field_item_state['mode'] was 'remove' instead of 'removed'. I updated the patch with this new change, tested it, and it appears to be working as intended

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Patch Failed to Apply
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    180 pass
  • 🇦🇺Australia paulabg

    While debugging the patch mentioned in comment #2, I discovered that the value of $child_field_item_state['mode'] was 'remove' instead of 'removed'. I updated the patch with this new change, tested it, and it appears to be working as intended

  • Status changed to Needs work over 1 year ago
  • 🇨🇭Switzerland miro_dietiker Switzerland

    Thank you for picking this up.

    I see the argument around the status change. But given that this bug affected no one enough to engage since 2017 makes me feel it can't be that major.

    Happy to fix it, thx for the work.
    Now we need test coverage for future QA (and also for easier review now).

Production build 0.71.5 2024