Complete Drag & drop feature not updating media reference order

Created on 11 December 2023, about 1 year ago

Problem/Motivation

When you use the Drag & Drop feature and change the order of paragraphs that have media linked to them, the order of the media files will not change after the Complete drag & drop button.

Steps to reproduce

  1. Create a paragraph type File with a media reference field and title field.
  2. Create a entity reference revisions field to node, referenced to File paragraph type
  3. Add a new node with have two file pragraphs, which have title and media entity.
  4. Save node and go to edit node.
  5. Click drag & drop feature
  6. Change order of file paragaphs
  7. Click complete drag & drop button
  8. After that file paragraph order is changed, but media entity order is in wrong order. Title texts are in correct order.
  9. If you save node without clicking complete drag & drop button, files are in correct order in saved node.
🐛 Bug report
Status

Active

Version

1.16

Component

User interface

Created by

🇫🇮Finland tuomas.kaulio

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

Comments & Activities

  • Issue created by @tuomas.kaulio
  • 🇨🇦Canada erichomanchuk

    I'm experiencing the same issue. I have a paragraph called "Media Gallery" and it has a paragraph revisions reference field to a paragraph called "Media Item". If I add a "Media Gallery" and add 2 "Media Items" I cannot use the "Drag and Drop" interface to change the order of the 2 "Media Items". Clicking the "Complete Drag & Drop" button after swapping the order does not change the order. I can only save the order change if I save the node and do not use the "Complete Drag & Drop" button.

  • I can confirm this is still an issue in 8.x-1.18

  • drupal/layout_paragraphs issue maybe?
    https://www.drupal.org/project/layout_paragraphs/issues/3401176 🐛 Allow to drag and drop nested paragraphs Active

Production build 0.71.5 2024