Skip to content
Snippets Groups Projects
Commit da363117 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Properly resolve field values in content preview

The StandardContentPreviewRenderer runs
through a list of fields, whose value should
be processed and displayed in the footer.

Some of those field values might be a reference
to a foreign table, e.g. in the "fe_group" field.
Due to changes in getProcessedValue(), it's
necessary to provide the records' uid, to be
able to resolve values of fields with a
"foreign_table" configuration.

Resolves: #96920
Releases: main, 11.5
Change-Id: I0d8739710e478a7cb264be1d5b90b70af31de964
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73537


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent 7fe3b506
Branches
Tags
No related merge requests found
......@@ -293,8 +293,8 @@ class StandardContentPreviewRenderer implements PreviewRendererInterface, Logger
$fieldArr = explode(',', $fieldList);
foreach ($fieldArr as $field) {
if ($record[$field]) {
$info[] = '<strong>' . htmlspecialchars((string)($itemLabels[$field] ?? '')) . '</strong> '
. htmlspecialchars(BackendUtility::getProcessedValue('tt_content', $field, $record[$field]) ?? '');
$fieldValue = BackendUtility::getProcessedValue('tt_content', $field, $record[$field], 0, false, false, $record['uid'] ?? 0) ?? '';
$info[] = '<strong>' . htmlspecialchars((string)($itemLabels[$field] ?? '')) . '</strong> ' . htmlspecialchars($fieldValue);
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment