[BUGFIX] colPos_list gets respected in language view 41/52041/2
authorTobias Kretschmann <tobi@tobishome.de>
Tue, 14 Mar 2017 13:55:23 +0000 (14:55 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 14 Mar 2017 17:13:47 +0000 (18:13 +0100)
mod.SHARED.colPos_list is now also respected in
Web > Page > Language View.

Since TYPO3 6.2 the setting was only respected in
Page > Columns View, but should also be taken
into account by the Language View as it is a
SHARED setting.

Releases: master, 7.6
Resolves: #80275
Change-Id: Ibdc90103208d5abbcfba1dbbfee3b87d045885f9
Reviewed-on: https://review.typo3.org/52041
Reviewed-by: Steffen Frese
Tested-by: Steffen Frese
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/View/PageLayoutView.php

index c768dbc..9d24ff4 100644 (file)
@@ -729,16 +729,18 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                 // in language mode process the content elements, but only fill $languageColumn. output will be generated later
                 $sortedLanguageColumn = [];
                 foreach ($cList as $columnId) {
-                    $languageColumn[$columnId][$lP] = $head[$columnId] . $content[$columnId];
-                    if (!$this->defLangBinding) {
-                        $languageColumn[$columnId][$lP] .= $this->newLanguageButton(
-                            $this->getNonTranslatedTTcontentUids($defaultLanguageElementsByColumn[$columnId], $id, $lP),
-                            $lP,
-                            $columnId
-                        );
+                    if (GeneralUtility::inList($this->tt_contentConfig['activeCols'], $columnId)) {
+                        $languageColumn[$columnId][$lP] = $head[$columnId] . $content[$columnId];
+                        if (!$this->defLangBinding) {
+                            $languageColumn[$columnId][$lP] .= $this->newLanguageButton(
+                                $this->getNonTranslatedTTcontentUids($defaultLanguageElementsByColumn[$columnId], $id, $lP),
+                                $lP,
+                                $columnId
+                            );
+                        }
+                        // We sort $languageColumn again according to $cList as it may contain data already from above.
+                        $sortedLanguageColumn[$columnId] = $languageColumn[$columnId];
                     }
-                    // We sort $languageColumn again according to $cList as it may contain data already from above.
-                    $sortedLanguageColumn[$columnId] = $languageColumn[$columnId];
                 }
                 $languageColumn = $sortedLanguageColumn;
             } else {