Project

General

Profile

Actions

Bug #97781

closed

default-value '[Empty]' in form-plugin finisher-override flexforms in TYPO3 v10.4

Added by Stephan Jorek almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2022-06-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
Remote Sprint

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

bug96478-regression.diff (0 Bytes) bug96478-regression.diff FinisherOptionGenerator - Diff between 10.4 and main Stephan Jorek, 2022-06-17 11:54

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #96478: PHP Warning: sprintf(): Too few arguments in FinisherOptionGenerator.php line 95Closed2022-01-07

Actions
Actions #1

Updated by Stephan Jorek almost 2 years ago

  • Related to Bug #96478: PHP Warning: sprintf(): Too few arguments in FinisherOptionGenerator.php line 95 added
Actions #2

Updated by Björn Jacob almost 2 years ago

  • Sprint Focus set to Remote Sprint
Actions #3

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74999

Actions #4

Updated by Anonymous almost 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF