Issue Bug Closed

#64163BackendUtility::getProcessedValue does not evaluate foreign_table_where

M. Ecker 01/07/15, 13:53 updated 03/23/25, 22:41

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.

History 5

  1. Markus Klein commented and changed status New Accepted Complexity no-brainer medium <span data-processor="relativetime" data-value="2015-01-07T14:25:26+00:00" > 01/07/15, 14:25 </span>

    We need unit tests for this.

  2. Benni Mack commented and changed status Accepted Needs 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.

  3. Benni Mack commented and changed status Needs Feedback Closed <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.