Issue Bug Closed

#87515PAGE_TSCONFIG_ID not working in Flexform select add-wizard

Burkhard Görtz 01/22/19, 10:00 updated 07/24/24, 05:27

Description

As of version TYPO3 9.5.3 with this settings:

flexform.xml

...
<settings.selection>
    <label>Test</label>
    <TCEforms>
        <config>
            <type>select</type>
            <foreign_table>tx_myext_domain_model_record</foreign_table>
            <foreign_table_where>tx_myext_domain_model_record.pid='###PAGE_TSCONFIG_ID###'</foreign_table_where>
            <renderType>selectMultipleSideBySide</renderType>
            <wizards>
                <add>
                    <type>script</type>
                    <title>New</title>
                    <module><name>wizard_add</name></module>
                    <icon>add.gif</icon>
                    <params>
                        <table>tx_myext_domain_model_record</table>
                        <pid>###PAGE_TSCONFIG_ID###</pid>
                        <setValue>prepend</setValue>
                    </params>
                </add>
            </wizards>
        </config>
    </TCEforms>
</settings.selection>
...

page.tsconfig

TCEFORM.tt_content.pi_flexform.myext_pi1.sDEF.settings\.selection.PAGE_TSCONFIG_ID = 42

The setting for PAGE_TSCONFIG_ID is respected in the foreign_table_where-clause.

However, in the add-wizard the setting isn’t respect, only

TCEFORM.tt_content.pi_flexform = 42

is taken into account.

In my opinion the code in \TYPO3\CMS\Backend\Controller\Wizard\AddController:162-171 is responsible and needs some work.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 5

  1. Franz Holzinger commented 03/11/21, 22:16

    Maybe the backslash makes a problem.
    You should try to use a name without a dot.

    > settings\.selection

  2. Oliver Bartsch commented and changed status New Accepted 11/07/22, 14:22

    Hi, I had a look into this issue and can reproduce this in current main.

    It seems that placeholder resolving for flexform fields (as mentioned here https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/PageTsconfig/TceForm.html#page-tsconfig-id) is not implemented at all. Neither for the “Add record” field control, nor for the “suggest wizard” or the “foreign table where” options. Resolving of FlexForm field specific TSconfig does only happen directly in the TcaFlexProcess data processor, which is not involved in the mentioned components.

  3. Manuel Winkelhofer commented 12/13/22, 11:01

    Hi, can repoduce it too in V11.

    as far as i was able to figure out:

    Happens in typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php around line 814

    the data should be in $result[‘pageTsConfig’][‘TCEFORM.’][‘tt_content.’]
    but its loaded into $result[‘pageTsConfig’][‘TCEFORM.’][‘sDEF.’]…..

  4. Georg Ringer commented and changed status Accepted Needs Feedback 07/08/24, 17:22

    I tested this in v13 with tsconfig

    TCEFORM.tx_styleguide_elements_select.flex_1.PAGE_TSCONFIG_ID = 12

    and the field select_multiplesidebyside_1

    can you also pls test in v13 or v12 again?

  5. Georg Ringer commented and changed status Needs Feedback Closed 07/24/24, 05:27

    as it works fine and to cleanup forge, I am closing this issue.
    if you don’t agree, please contact me via slack.