#64163BackendUtility::getProcessedValue does not evaluate foreign_table_where
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.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 2
History 5
-
Markus Klein commented and changed status
NewAccepted Complexityno-brainermedium <span data-processor="relativetime" data-value="2015-01-07T14:25:26+00:00" > 01/07/15, 14:25 </span> -
Mathias Schreiber changed target version <span data-processor="relativetime" data-value="2015-11-12T17:15:35+00:00" > 11/12/15, 17:15 </span>
-
Christian Eßl changed category <span data-processor="relativetime" data-value="2019-10-01T15:49:37+00:00" > 10/01/19, 15:49 </span>
-
Benni Mack commented and changed status
AcceptedNeeds Feedback <span data-processor="relativetime" data-value="2024-08-06T15:15:23+00:00" > 08/06/24, 15:15 </span>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.
-
Benni Mack commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2025-03-23T22:41:03+00:00" > 03/23/25, 22:41 </span>Closing this issue due to lack of feedback after 90+ days. If you feel this is the wrong decision, let me know, so I will re-open the issue.
We need unit tests for this.