Problem/Motivation

Followup from #2851402: Error on subform state when removing/adding container .
Since we are using the subform state for the submitBehaviorForm, the behavior settings are not properly set when reordering the paragraph fields.

Proposed resolution

Maybe revert the submitBehaviorForm() to use the values instead a subform state

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Ginovski created an issue. See original summary.

ginovski’s picture

Title: Plugin values not applying when reordering items » Behavior plugin values not applying when reordering items
ginovski’s picture

Status: Active » Needs review
StatusFileSize
new980 bytes

Added a test asserting the value of the behavior plugin values.

Status: Needs review » Needs work

The last submitted patch, 3: behavior_plugin_values-2853146-3-test-only.patch, failed testing.

johnchque’s picture

Can confirm, values are not being applied. We could use the values for the submitBehaviorForm, agree.

miro_dietiker’s picture

This seems related to other delta related problems, such as:
#2852425: Wrong item duplicated when removed / reordered
And also the auto-cleanup entered this trap:
#2846549: Handle non-existing paragraphs in the UI

Can we not move swap subform states according to the reordering? ;-)

miro_dietiker’s picture

ginovski’s picture

Status: Needs work » Needs review
StatusFileSize
new3.78 KB
new980 bytes

Adding a working patch with the previous version (no subform state for the submit) - if no better solution is possible.

Status: Needs review » Needs work

The last submitted patch, 8: behavior_plugin_values-2853146-3-test-only.patch, failed testing.

ginovski’s picture

Status: Needs work » Needs review

Returning to needs review - test only failed.

johnchque’s picture

Next time upload test-only first. Anyone against RTBC this?

berdir’s picture

That breaks paragraphs collection again then and then we have to break it *again* once it works. Because this API is definitely what we want.

Also, pretty sure that validate is likely going to have similar problems and would validate the wrong values for example.

So yeah, I'm against this :) I'll try to figure something out here.

berdir’s picture

Priority: Normal » Critical
Status: Needs review » Needs work

Lets start with a reroll.

Also making this critical because this can result in data loss/mangling.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new3.96 KB

Rebased, ignored the permission check there for now, just want to see if the tests still pass. Going to try doing a different fix now.

berdir’s picture

StatusFileSize
new2.44 KB

This fixes the test for me.

  • Primsi committed 1384fbe on 8.x-1.x authored by Berdir
    Issue #2853146 by Ginovski, Berdir, yongt9412: Behavior plugin values...
primsi’s picture

Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.