[BUGFIX] Use the real page id for doesPageHaveUnallowedTables check 87/53687/5
authorWolfgang Klinger <wolfgang@wazum.com>
Sat, 12 Aug 2017 18:53:00 +0000 (20:53 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 7 Mar 2018 14:37:31 +0000 (15:37 +0100)
In case of handling a translated page record, use the according
proper uid value of the containing page of default language.

Resolves: #82053
Releases: master, 8.7
Change-Id: I0d0b5a268f4b87ef44d892f046ef474624b18058
Reviewed-on: https://review.typo3.org/53687
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 087ab38..b7b5bb4 100644 (file)
@@ -1614,7 +1614,9 @@ class DataHandler implements LoggerAwareInterface
                 // This checks 1) if we should check for disallowed tables and 2) if there are records from disallowed tables on the current page
                 $onlyAllowedTables = $GLOBALS['PAGES_TYPES'][$value]['onlyAllowedTables'] ?? $GLOBALS['PAGES_TYPES']['default']['onlyAllowedTables'];
                 if ($onlyAllowedTables) {
-                    $theWrongTables = $this->doesPageHaveUnallowedTables($id, $value);
+                    // use the real page id (default language)
+                    $recordId = $this->getDefaultLanguagePageId($id);
+                    $theWrongTables = $this->doesPageHaveUnallowedTables($recordId, $value);
                     if ($theWrongTables) {
                         if ($this->enableLogging) {
                             $propArr = $this->getRecordProperties($table, $id);