Bug #64163
openBackendUtility::getProcessedValue does not evaluate foreign_table_where
0%
Description
If you defined in TCA a column as 'select' with a 'foreign_table_where' condition you'll see in the Edit Record view only the options meeting the condition - correct.
But if you choose the column to be shown in the single table view of Web/List the condition will not be evaluated and a csv list of all records of the foreign_table will be shown (but only the first 100 chars of this csv list).
TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList uses BackendUtility::getProcessedValueExtra to render the column fields in the record list, which is a wrapper for BackendUtility::getProcessedValue.
Line 2129 of TYPO3\CMS\Backend\Utility\BackendUtility reads currently (TYPO3 V6.2.9) as
$records = self::getRecordsByField($theColConf['foreign_table'], $theColConf['foreign_field'], $uid);.
If changed to
$records = self::getRecordsByField($theColConf['foreign_table'], $theColConf['foreign_field'], $uid, $theColConf['foreign_table_where']);,
all is fine and the 'foreign_table_where' is evaluated in Record List view also.
Would be nice, if this would be changed in 6.2.10 - need this for a running project.
Updated by Markus Klein almost 10 years ago
- Status changed from New to Accepted
- Complexity changed from no-brainer to medium
We need unit tests for this.
Updated by Mathias Schreiber about 9 years ago
- Target version deleted (
next-patchlevel)
Updated by Benni Mack 4 months ago
- Status changed from Accepted to Needs Feedback
Hey,
thanks for the issue. I don't understand the problem. We replaced this logic with RelationHandler and it seems to work without any problems. Please let me know how to reproduce this, or add a screenshot.