[BUGFIX] Only display pages in default language after creating new pages 93/58393/2
authorJigal van Hemert <jigal.van.hemert@typo3.org>
Tue, 25 Sep 2018 19:22:40 +0000 (21:22 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 28 Sep 2018 11:51:03 +0000 (13:51 +0200)
The Create Multiple Pages action now only displays the new structure in the
default language and hides pages in other languages that are already in the
pagetree.

Resolves: #86378
Releases: master
Change-Id: I14e45436d62300465d93ee87408523372007e394
Reviewed-on: https://review.typo3.org/58393
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Tested-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Controller/Page/NewMultiplePagesController.php

index 49a9818..688ed73 100644 (file)
@@ -257,6 +257,10 @@ class NewMultiplePagesController
                 $queryBuilder->expr()->eq(
                     'pid',
                     $queryBuilder->createNamedParameter($pageUid, \PDO::PARAM_INT)
+                ),
+                $queryBuilder->expr()->eq(
+                    $GLOBALS['TCA']['pages']['ctrl']['languageField'],
+                    $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
                 )
             )
             ->orderBy('sorting')