From c02ff6dd3522240d90fb0991ae741749d5a720e1 Mon Sep 17 00:00:00 2001 From: Kevin Ditscheid Date: Thu, 20 Aug 2020 08:22:11 +0200 Subject: [PATCH] [BUGFIX] Fix isOverlayRecord check --- Classes/Service/BackendServices.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Classes/Service/BackendServices.php b/Classes/Service/BackendServices.php index d103073..78a831a 100644 --- a/Classes/Service/BackendServices.php +++ b/Classes/Service/BackendServices.php @@ -109,11 +109,16 @@ class BackendServices extends AbstractServices { $result = FALSE; if (in_array($table, VisibilityService::getSupportedTables(), TRUE)) { - $tanslationIdField = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']; - if ($tanslationIdField !== '') { + $translationIdField = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']; + if ($translationIdField !== '') { // if the field which points to the original of the translation is // not 0 a translation exists and we have an overlay record - $result = $row[$tanslationIdField] !== 0; + if (is_array($row[$translationIdField])) { + // somehow the sys_language_uid field could contain 0 => 0 + $result = (int) $row[$translationIdField][0] !== 0; + } else { + $result = (int) $row[$translationIdField] !== 0; + } } } -- GitLab