[BUGFIX] Allow translating content on MSSQL 79/53679/2
authorSusanne Moog <susanne.moog@typo3.com>
Fri, 11 Aug 2017 10:31:02 +0000 (12:31 +0200)
committerJan Helke <typo3@helke.de>
Fri, 11 Aug 2017 12:55:28 +0000 (14:55 +0200)
Translating content on MSSQL installations has
been impossible due to SQL errors.

The GROUP BY statements in page module and
localizationRepository have been fixed.

Change-Id: I20a4778e3c0858aca80060ba333ce6a47e42ce38
Resolves: #82085
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/53679
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
typo3/sysext/backend/Classes/Domain/Repository/Localization/LocalizationRepository.php
typo3/sysext/backend/Classes/View/PageLayoutView.php

index 05dd5d7..54746af 100644 (file)
@@ -155,7 +155,7 @@ class LocalizationRepository
             ->from('tt_content')
             ->from('sys_language')
             ->where(...$constraints)
-            ->groupBy('sys_language.uid')
+            ->groupBy('sys_language.uid', 'sys_language.sorting')
             ->orderBy('sys_language.sorting');
 
         $result = $queryBuilder->execute()->fetchAll();
index 65d5e32..b313968 100644 (file)
@@ -2111,7 +2111,8 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                 )
                 ->groupBy('pages_language_overlay.sys_language_uid', 'sys_language.uid', 'sys_language.pid',
                     'sys_language.tstamp', 'sys_language.hidden', 'sys_language.title',
-                    'sys_language.language_isocode', 'sys_language.static_lang_isocode', 'sys_language.flag')
+                    'sys_language.language_isocode', 'sys_language.static_lang_isocode', 'sys_language.flag',
+                    'sys_language.sorting')
                 ->orderBy('sys_language.sorting');
             if (!$this->getBackendUser()->isAdmin()) {
                 $queryBuilder->andWhere(