Project

General

Profile

Actions

Bug #87515

open

PAGE_TSCONFIG_ID not working in Flexform select add-wizard

Added by Burkhard Görtz over 5 years ago. Updated over 1 year ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2019-01-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Franz Holzinger about 3 years ago

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

settings\.selection

Actions #2

Updated by Oliver Bartsch over 1 year ago

  • Status changed from New to Accepted

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.

Actions #3

Updated by Manuel Winkelhofer over 1 year ago

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.'].....

Actions

Also available in: Atom PDF