Problem/Motivation

If you enter the drag & drop mode, you have to press the "complete drag & drop" button to persist the dragging data.

If you directly hit save, the original state of sequence is used.

Proposed resolution

Process drag & drop also on direct save submission.

CommentFileSizeAuthor
#11 paragraphs_2903124.mp4823.33 KBDuaelFr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

miro_dietiker created an issue. See original summary.

zerolab’s picture

miro_dietiker’s picture

I have the feeling those are two pretty much different problems.

kiwimind’s picture

Having recently tried the drag and drop feature of paragraphs I have come across this same issue.

This one does appear to be a duplicate of the other as they're both describing the same symptom.

miro_dietiker’s picture

I recently tested and at least one time it saved correctly after directly hitting save. It was when i moved an item on the top level.

Needs more investigation.

clairedesbois@gmail.com’s picture

This bug seems occur when we have too much element in the page and it's heavy. It's what happens for one of our projects with huge pages with a lot of paragraphs.

jstoller’s picture

I've got a user who's been using drag and drop a lot and keeps complaining about data being lost, or overwritten by other data. She says she pushes the the "complete drag & drop" button before saving, but her pages can be pretty heavy, with multiple paragraphs fields and lots of paragraphs items, including nested paragraphs. In fact, she says sometimes her content changes as soon as she presses the drag and drop button, before she even moves anything. And even when she moves paragraphs, the content that changes is generally stuff that she didn't touch. Sometimes paragraphs disappear all together, but sometimes there seems to be crosstalk between paragraphs. For instance she'll have two separate media gallery paragraphs with different sets of referenced media items in them, then all of a sudden they have identical content.

mohithasmukh’s picture

I am also facing the same issue. When the page has alot of paragraphs and is heavy when doing drag and drop the content changes. The way I got around this is by collapsing it all and then moving the paragraphs.

Thanks.

miro_dietiker’s picture

Yeah i have seen such strange behavior as well.

I could reproduce the bug when we have nested paragraphs already when editing.
If you now add a new Paragraph prepending the nested ones and then switch to Drag & Drop without saving, you can end up with many consistency problems, from lost to randomly mixed Paragraphs.

Related to deletion, see also #2905264: Deleted Paragraphs visible in drag & drop

However, i have never seen such an issue with loss and mixing if you directly go to drag & drop right after editing, without adding or deleting any Paragraph. And yes, always hit Complete Drag & Drop before Save.
If it is different for you, please report it (again), specifically including how to reproduce it.

jstoller’s picture

@miro_dietiker if that is the case, then can we disable Drag & Drop once you've added/deleted something, and disable the Save button while you're in Drag & Drop mode?

DuaelFr’s picture

Priority: Normal » Major
Issue summary: View changes
FileSize
823.33 KB

As seen in Issues Priority documentation this issue should be considered as Major because of risks of user data input.

In the attached screencast, I illustrated the issue.

Steps to reproduce

  1. Create a content with 3 paragraphs
  2. Edit the content
  3. Delete the last one
  4. Enter drag and drop mode
    => deleted paragraph appears
  5. Exit drag and drop mode
    => deleted paragraph disappears
  6. Delete the first paragraph
  7. Enter drag and drop mode
    => the second and third paragraph appears
  8. Exit drag and drop mode
    => the second and third paragraph still appears

Expected behavior

At step 4 we expect the third paragraph to remain hidden in drag and drop mode.
At step 7 and 8 we expect the first and third paragraphs to remain hidden.