[BUGFIX] Add missing column in database query 71/56571/5
authorGeorg Ringer <georg.ringer@gmail.com>
Thu, 5 Apr 2018 15:29:47 +0000 (17:29 +0200)
committerNicole Cordes <typo3@cordes.co>
Sat, 14 Apr 2018 13:13:58 +0000 (15:13 +0200)
To avoid exceptions on certain database systems the pid must be selected
as well as it is used in the order statement.

Resolves: #84303
Releases: master, 8.7
Change-Id: I1f41925d9c22c20a2fa3f080b85bb4d17d03a778
Reviewed-on: https://review.typo3.org/56571
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Simon Gilli <typo3@gilbertsoft.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php

index 762093b..394ac15 100644 (file)
@@ -217,7 +217,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass
                 ->from('pages')
                 ->from('sys_template')
                 ->where($queryBuilder->expr()->eq('pages.uid', $queryBuilder->quoteIdentifier('sys_template.pid')))
-                ->groupBy('pages.uid')
+                ->groupBy('pages.uid', 'pages.pid', 'pages.sorting')
                 ->orderBy('pages.pid')
                 ->addOrderBy('pages.sorting')
                 ->execute();