Closed (duplicate)
Project:
Diff
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
20 Dec 2016 at 03:38 UTC
Updated:
6 Jan 2017 at 17:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ipumpkinComment #3
johnchqueCan you explain better the steps to reproduce the problem please?
When you say "when one field(A) settings save" you mean press the "Update" button after changing some settings of the plugin?
Can you try with the patch in #2826873: Changes when saving field configuration unchanged please? And check if you still have the problems you described.
Comment #4
johnchqueI can confirm that the bug 2. of the IS is present, and with the patch in #2826873: Changes when saving field configuration unchanged that I uploaded it fixes it. Btw, I cannot reproduce the first bug.
Comment #5
ipumpkin@yongt9412 thanks your reply,I'm sorry my poor english.
With the patch https://www.drupal.org/files/issues/changes_when_saving-2826873-9.patch I have the bug 2 fixed,but the bug 1 remain has.I reproduce this with the patch above and with my patch this bug also is remain:
Comment #6
johnchqueThanks @ipumpkin for the detailed explanation, I will look at it.
Comment #7
johnchqueBeen looking into it and it seems the bug has been there for quite a while, it actually creates a formState object from the values that were changed but nothing about the ones that were not. Need to investigate how to fix this in a proper way.
Comment #8
johnchqueOk, took kind of long to fix this, but it seems it works now. @ipumpkin can you check once again if the bugs you noticed are still present with this patch? :)
Comment #10
johnchqueAdded tests for "hidden" selection, this patch also fixes that. :)
Comment #12
miro_dietikerLuckily settings from defaultConfiguration are never empty, otherwise configuration would be never submitted... We should check better !==NULL.
Checked defaultConfiguration overrides and i think we should clean them up a bit too.
Comment #13
johnchqueThe logic about it is that we need to use the default config only when we don't have config saved for a field. I tried, with the patch, to avoid overriding with the default config unless it is really needed.
As mentioned above, the data was lost when we save the settings without updating any field, so if there are no fields updated why should we save? That's the logic behind the
if ($settings) {.Comment #14
johnchqueThis will be postponed on #2826873: Changes when saving field configuration unchanged
Comment #15
berdirCan be closed as duplicate actually, as it has been merged into that, including a lot of additional fixes and tests.