[BUGFIX] Only query default language PIDs in suggest wizard 65/57265/2
authorBenni Mack <benni@typo3.org>
Mon, 18 Jun 2018 17:25:01 +0000 (19:25 +0200)
committerNicole Cordes <typo3@cordes.co>
Thu, 21 Jun 2018 09:24:26 +0000 (11:24 +0200)
Due to the removal of "pages_language_overlay", the page IDs for
FormEngine's suggest wizard contains page IDs of all languages, however
it is defined that the "pid" field is only limited to the default language.

Adding a check for `sys_language_uid=0` ensures that the pid IN
query is much smaller than before.

Resolves: #85308
Releases: master
Change-Id: I21e2c706dc3d73986e027cb9e014e3f69980d3ba
Reviewed-on: https://review.typo3.org/57265
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/backend/Classes/Form/Wizard/SuggestWizardDefaultReceiver.php

index 0933d6c..b42c080 100644 (file)
@@ -309,7 +309,8 @@ class SuggestWizardDefaultReceiver
                     $queryBuilder->expr()->in(
                         'pid',
                         $queryBuilder->createNamedParameter($pageIds, Connection::PARAM_INT_ARRAY)
-                    )
+                    ),
+                    $queryBuilder->expr()->eq('sys_language_uid', 0)
                 )
                 ->execute()
                 ->fetchAll();