Commit fb6cb83e authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Skip non existing fields in Element information

The element information component displays all the
records' field values. In case a TCA field does not have
a corresponding database field (e.g. with TCA type "none")
it is now skipped to prevent PHP errors.

Resolves: #97999
Releases: main, 11.5
Change-Id: I817f1dda4275f262768dfbe8440a57d9d6240f7b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75349

Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent ffcd14c3
......@@ -235,6 +235,11 @@ class ElementInformationController
continue;
}
// Field does not exist (e.g. having type=none) -> skip
if (!array_key_exists($name, $this->row)) {
continue;
}
$isExcluded = !(!($GLOBALS['TCA'][$this->table]['columns'][$name]['exclude'] ?? false) || $this->getBackendUser()->check('non_exclude_fields', $this->table . ':' . $name));
if ($isExcluded) {
continue;
......
Supports Markdown
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