Closed (fixed)
Project:
Paragraphs
Version:
8.x-1.x-dev
Component:
Experimental Widget
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jun 2017 at 13:32 UTC
Updated:
26 Jul 2017 at 09:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
primsi commentedInitial patch, still missing tests. I think that the problem is that we are missing items in the user input array, which then messes up the value assigning part of form building.
Also bumping to major, because this can lead to data loss.
Comment #3
primsi commentedLet's see first if we broke something.
Comment #5
primsi commentedModified tests and removed the change about where the paragraph is inserted.
Comment #6
primsi commentedComment #8
primsi commentedComment #10
miro_dietikerI'll test this a bit on some production environment while working with content.
Comment #11
berdirthis might conflict with other things that we've also soon.
the way this works for new paragraphs, no matter where they are placed exactly is to append them and then use original deltas to position them.
We might want to consider doing the same here..
We also noticed similar bugs when duplicating a paragraph and then moving it before save, we ended up with some paragraphs lost and others duplicated.
Also marking as critical due to that. It's just the experimental widget, sure, but we are using that in production and so might others. API stability is one thing, data stability another.
Comment #12
berdirUh, this was a ride :)
Had to change the test a bit to work with this approach, bu it is working quite well now.
Tried moving items around before and after duplicating (and both) and it seems to be quite stable.
We need a test that does something like this:
Create a node with 3 paragraphs, A, B, C. Then move C first, then duplicate C, so youhave CCAB, then move B to second, then save. then make sure you have CBCA.
Comment #13
berdirExpanded the test to cover that reorder stuff as well as deletions.
Comment #14
berdirComment #16
primsi commentedOk, let's get this in. Thanks!