[BUGFIX] Display BE layouts in correct order 57/35757/2
authorMarkus Klein <klein.t3@reelworx.at>
Sat, 3 Jan 2015 15:43:30 +0000 (16:43 +0100)
committerStefan Froemken <froemken@gmail.com>
Mon, 5 Jan 2015 14:40:44 +0000 (15:40 +0100)
When using the Languages view in Page module the Backend Layout
columns are now sorted correctly.

Releases: master, 6.2
Resolves: #60389
Change-Id: I74c010512ff405b143352755f8c862a55ef6c391
Reviewed-on: http://review.typo3.org/35757
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Tested-by: Stefan Froemken <froemken@gmail.com>
typo3/sysext/backend/Classes/View/PageLayoutView.php

index c7fc34b..632a0cf 100644 (file)
@@ -566,6 +566,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                $out = '';
                                if ($this->tt_contentConfig['languageMode']) {
                                        // in language mode process the content elements, but only fill $languageColumn. output will be generated later
+                                       $sortedLanguageColumn = array();
                                        foreach ($cList as $key) {
                                                $languageColumn[$key][$lP] = $head[$key] . $content[$key];
                                                if (!$this->defLangBinding) {
@@ -574,7 +575,10 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                                                $lP
                                                        );
                                                }
+                                               // We sort $languageColumn again according to $cList as it may contain data already from above.
+                                               $sortedLanguageColumn[$key] = $languageColumn[$key];
                                        }
+                                       $languageColumn = $sortedLanguageColumn;
                                } else {
                                        $backendLayout = $this->getBackendLayoutView()->getSelectedBackendLayout($this->id);
                                        // GRID VIEW: