51519[BUGFIX] FlexForms do not support "null" values
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 4
Review log 1213
-
Thorben Nissen uploaded patch set 1 02/03/17, 14:12
-
Christian Kuhn commented on patch set 1 02/03/17, 15:25
how is 'null' value stored in db and distinct from empty value? -
Thorben Nissen commented on patch set 1 02/03/17, 15:27
For normal fields that have a corresponding database field, the database field is set to NULL instead of "". Therefore the database field must be configured to accept NULL. -
Christian Kuhn commented on patch set 1 02/03/17, 16:39
yes, i understood the null value handling on db field basis. for flex fields, the data values are stored as an xml string in the database, a single value typically like ... <field index="tableparsing_delimiter"> <value index="vDEF">124</value> </field> ... Value is here "124". My question is, how null for a flex field value is stored? -
Thorben Nissen commented on patch set 1 02/03/17, 18:55
This would look like ... <field index="some_property"> <value index="vDEF" type="NULL"></value> </field> ... For array 'type="array"' is set accordingly. 'type="NULL"' leads to xml2array parsing this as null instead of "" when loading it from database. -
Christian Kuhn commented on patch set 1 02/04/17, 16:14
i see. i wasn't aware flex form is actually able to store null properly. -
Tymoteusz Motylewski commented on patch set 1 02/06/17, 15:42
1. can you elaborate a little bit more on the usecase 2. how can I test it? Can you maybe share a test extension or configuration? -
Thorben Nissen commented on patch set 1 02/08/17, 09:47
As I wrote in the description, it is not possible to use the placeholder mechanism like, e.g. in file references. I was trying to improve EXT:form by making the "overide finisher settings" nullable to allow overriding of only certain settings and take the others from the form configuration. Another use case could be to "inherit" a value from record's field in a flexform for a plugin. If null, take it from the records, else use it. So the record's value can be overridden with an empty string. If it helps I could provide the patch I have prepared so far for EXT:form which depends on this here. -
Tymoteusz Motylewski commented on patch set 1 02/09/17, 21:43
Can you share some test extension so it's easier to test? -
Christian Kuhn commented on patch set 1 CR -1 02/10/17, 00:43
well. null placeholder handling has never been possible within flex forms. this is only possible since my latest refactoring where i moved the placeholder html stuff from SingleFieldContainer to single elements with patch https://review.typo3.org/#/c/51151/. enabling that functionality now needs only these changes in flex handling. however, i'm not entirely sure about side effects if we do this change. strictly speaking, this change is a feature since it enable stuff that has never been possible before. it also needs a change within the flex xml parser which is not very well tested yet. i'm a bit biased here - on one hand that looks simple, on the other hand i'm not entirely sure if that patch may cripple xml integrity at some point. at the moment i tend to rather shift that to "after v8", we're now in feature freeze phase ... -
Mathias Schreiber uploaded patch set 2 02/06/18, 19:33
-
TYPO3com voted on patch set 2 V +1 02/06/18, 19:38 Completed build in 05m 43s on Tue, 6 Feb, 08:38 PM Test Summary: 30440 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-19031
-
Christian Kuhn abandoned the change 09/16/18, 23:55
hey. this patch stalled in the review system for 1,5 years. no pun intended, but i'll just abandon it for now from the review system for the sake of a smaller review queue. please feel free to resurrect the change and bring it up again, it should be solvable if you are still interested.