#110217RecordFieldPreviewProcessor::prepareFieldWithLabel() ignores CType-specific Page TSconfig overrides for selectSingle item labels
Description
Description
When rendering a field with RecordFieldPreviewProcessor::prepareFieldWithLabel(), the displayed label for a select field using renderType = selectSingle does not respect CType-specific Page TSconfig overrides.
The field has three items in its default TCA configuration. For a specific tt_content.CType, the available select items are overridden via Page TSconfig and the field then contains five items.
In the backend edit form, the Page TSconfig override works correctly: the five overridden options are shown and can be selected.
However, when rendering the field in a backend preview using:
$this->fieldProcessor->prepareFieldWithLabel($record, 'my_field');
the selected value is resolved using the default TCA configuration instead of the effective configuration after applying the CType-specific Page TSconfig override. As a result, the preview displays an incorrect label.
Steps to reproduce
- Create a
tt_contentfield with a TCA configuration similar to:
'my_field' => [
'label' => 'My field',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['Default option 1', 'option1'],
['Default option 2', 'option2'],
['Default option 3', 'option3'],
],
],
],
- Add a CType-specific Page TSconfig override that changes or extends the field items:
TCEFORM.tt_content.my_field.types.my_custom_ctype {
addItems.option4 = Overridden option 4
addItems.option5 = Overridden option 5
}
- Create a content element with
CType = my_custom_ctype. - Select
option4oroption5in the backend form. - Render the field in a custom preview renderer:
$this->fieldProcessor->prepareFieldWithLabel($record, 'my_field');
Actual behavior
The preview resolves the selected value based on the default TCA items configuration.
If the selected value only exists due to the CType-specific Page TSconfig configuration, the preview may show an invalid value or an incorrect/default label.
Expected behavior
RecordFieldPreviewProcessor::prepareFieldWithLabel() should resolve the selected item label using the effective TCA configuration for the current record, including:
- Page TSconfig of the record’s page
- CType-specific overrides via
TCEFORM.tt_content.<field>.types.<CType> - Other relevant FormEngine item processing
This should produce the same label as shown in the backend edit form.
Technical context
RecordFieldPreviewProcessor::prepareFieldWithLabel() internally uses BackendUtility::getProcessedValue() to resolve the human-readable value.
BackendUtility::getProcessedValue() provides optional parameters for the record UID, PID and the complete record row. The PID is used to evaluate Page TSconfig, and the complete row provides additional context, for example for itemsProcFunc processing. [5]
It appears that RecordFieldPreviewProcessor does not pass the required record context to BackendUtility::getProcessedValue(). As a result, the default TCA configuration is used instead of the CType-specific Page TSconfig override.
Environment
Reviews 2
History 28
-
Gerrit Code Review pushed patch set 1 for main to change 94815 status
NewUnder Review <span data-processor="relativetime" data-value="2026-07-17T14:15:49+00:00" > 07/17/26, 14:15 </span> -
Gerrit Code Review pushed patch set 2 for main to change 94815 <span data-processor="relativetime" data-value="2026-07-22T11:37:46+00:00" > 07/22/26, 11:37 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 94815 <span data-processor="relativetime" data-value="2026-07-22T11:43:30+00:00" > 07/22/26, 11:43 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 94815 <span data-processor="relativetime" data-value="2026-07-22T13:21:16+00:00" > 07/22/26, 13:21 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 94815 <span data-processor="relativetime" data-value="2026-07-23T14:54:44+00:00" > 07/23/26, 14:54 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 94919 <span data-processor="relativetime" data-value="2026-07-24T07:13:20+00:00" > 07/24/26, 07:13 </span>
-
Can Karadag commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-07-24T07:15:09+00:00" > 07/24/26, 07:15 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-08-11T08:51:05+00:00" > 08/11/26, 08:51 </span>
Applied in changeset commit:64755449693523ef5cef8a9674e7ff39cc64d24f.