Bug #30354

FlexForm select fields can't replace makers in their foreign_table_where clause

Added by Stephen Bungert almost 10 years ago. Updated almost 3 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


FlexForm select fields can't replace makers (like ###PAGE_TSCONFIG_IDLIST###) in their foreign_table_where clause in the left hand part of the input because the $field argument in selectAddForeign() is empty.

The righthand side part of the select field (taht lists all records) can convert these in to the correct values, the records are selectable and their uids are saved in the flexform in the tt_content record, but they are not shown in the left hand side where the actual selected records are shown.

Here is the flexform ds for my select field:

                <items type="array">
                    <numIndex index="0" type="array">
                        <numIndex index="0">LLL:EXT:sb_portfolio/pi1/flexform_locallang.xml:itemSelection.category.0</numIndex>
                        <numIndex index="1">-1</numIndex>
                    <numIndex index="1" type="array">
                        <numIndex index="0">LLL:EXT:sb_portfolio/pi1/flexform_locallang.xml:itemSelection.category.1</numIndex>
                        <numIndex index="1">--div--</numIndex>
                <foreign_table_where> AND tx_sbportfolio_categories.pid IN (###STORAGE_PID###, ###PAGE_TSCONFIG_IDLIST###) AND (tx_sbportfolio_categories.sys_language_uid=0 || (tx_sbportfolio_categories.sys_language_uid>0 AND tx_sbportfolio_categories.l10n_parent=0)) ORDER BY tx_sbportfolio_categories.title ASC</foreign_table_where>

i have solved it useing an itemsProcFunc that works just on the left hand part of the select field, but I believe this is a bug. If the righthand record list is able to convert these markers, and they are selectable, and saved in the DB, the the left part of the select field should be capable os shwoing them too. they are after all selected.

Without $field being set to 'pi_flexform' it can't as the field is needed in the function exec_foreign_table_where_query().

An example:

$fTWHERE = str_replace('###PAGE_TSCONFIG_IDLIST###', 


class.tx_sbportfolio_ffcategories.zip (1.72 KB) class.tx_sbportfolio_ffcategories.zip itemsProcFunc to fix problem Stephen Bungert, 2011-09-27 15:03
ffbug01.png (43.3 KB) ffbug01.png Stephen Bungert, 2011-09-30 22:58
ffbug02.png (42.6 KB) ffbug02.png Stephen Bungert, 2011-09-30 22:58
ffbug03.png (22.4 KB) ffbug03.png Stephen Bungert, 2011-09-30 22:58

Related issues

Related to TYPO3 Core - Bug #50785: FlexForm does not substitute markers in foreign_table_whereClosed2013-08-05

Related to TYPO3 Core - Bug #16392: Page-TSconfig ###PAGE_TSCONFIG_STR### not evaluated correctly in BackendClosed2006-07-21


Also available in: Atom PDF