Commit 3c4dc4b8 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Georg Ringer
Browse files

[BUGFIX] Avoid "All languages" option for single language sites

In case a site in the TYPO3 page tree only features the
default language, the module menu of the page module
does no longer add "All languages" as option, since this
led to misbehaviour, e.g. empty views in some cases.

Resolves: #95308
Releases: master
Change-Id: I54f72c99ff5c8511fd119e024493153408be33c3

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Benni Mack's avatarBenni Mack <>
Tested-by: Wouter Wolters's avatarWouter Wolters <>
Tested-by: Georg Ringer's avatarGeorg Ringer <>
Reviewed-by: Simon Schaufelberger's avatarSimon Schaufelberger <>
Reviewed-by: Benni Mack's avatarBenni Mack <>
Reviewed-by: Thomas Löffler's avatarThomas Löffler <>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <>
parent e27614cd
......@@ -267,6 +267,9 @@ class PageLayoutController
if (isset($this->availableLanguages[0])) {
$this->MOD_MENU['language'][0] = $this->availableLanguages[0]->getTitle();
// Add special "-1" in case multiple languages exist
if (count($this->availableLanguages) > 1) {
// We need to add -1 (all) here so a possible -1 value in &SET['language'] will be respected
// by BackendUtility::getModuleData. Actually, this is only relevant if we are dealing with the
// "languages" mode, which however can only be determined, after the MOD_SETTINGS have been calculated
......@@ -275,6 +278,7 @@ class PageLayoutController
// @todo Replace the whole "mode" handling with some more robust solution
$this->MOD_MENU['language'][-1] = $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:multipleLanguages');
// Initialize the available actions
$actions = $this->initActions();
// Clean up settings
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment