Bug #97781
closeddefault-value '[Empty]' in form-plugin finisher-override flexforms in TYPO3 v10.4
100%
Description
The bugfix #96478 created a regression in TYPO3 v10.4 only, where now the string [Empty]
is used to prefill the flexform-fields created by the form-framework in form-plugin using override finishers.
When creating a form-plugin and activating the “Override Finishers” checkbox, any fields which are empty in the finisher-configuration of YAML-file, will contain the string [Empty]
as their default-value. This even happens invisible in content-element selection-fields like in the ConfirmationMessage
Finisher. The resulting pi_flexform
value looks currently like:
<T3FlexForms>
…
<sheet index="a5b16832a4775470bbfb0c16921da6b1">
<language index="lDEF">
<field index="settings.finishers.Confirmation.contentElementUid">
<!-- Here you can see the wrong value: -->
<value index="vDEF">[Empty]</value>
</field>
<field index="settings.finishers.Confirmation.message">
<value index="vDEF">…</value>
</field>
</language>
</sheet>
<sheet index="5db5b5787109d079904b7ef6c655822f">
<language index="lDEF">
<field index="settings.finishers.EmailToSender.subject">
<value index="vDEF">…</value>
</field>
<field index="settings.finishers.EmailToSender.senderAddress">
<value index="vDEF">a@b.c</value>
</field>
<field index="settings.finishers.EmailToSender.senderName">
<!-- Here you can see the wrong value: -->
<value index="vDEF">[Empty]</value>
</field>
<field index="settings.finishers.EmailToSender.addHtmlPart">
<value index="vDEF">1</value>
</field>
<field index="settings.finishers.EmailToSender.translation.language">
<!-- Here you can see the wrong value: -->
<value index="vDEF">[Empty]</value>
</field>
<field index="settings.finishers.EmailToSender.title">
<!-- Here you can see the wrong value: -->
<value index="vDEF">[Empty]</value>
</field>
</language>
</sheet>
…
</T3FlexForms>
I added a comment on github to outline the regression. When you compare the 10.4 version of the FinisherOptionGenerator
with it's 11.5- or main-branch pendant, you can see that the $optionValue
gets assign earlier there, so in these versions there is no regression. See the attached diff-file below.
The solution to this regression should fix this behaviour, ie. like in version 11.5 and above. Additionally one should provide an update-wizard fixing any values, which have already been persisted in tt_content.pi_flexform
. The update-wizard should take any translated [Empty]
values into account too. Without the update-wizard it would be nearly impossible for editors to fix the above mentioned content-element selection-fields.
If you wish, I could provide a PR that contains both or either one of this proposed solutions, just give me a reply. The code is ready …
Files