Commit 07aff9ef authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Georg Ringer
Browse files

[BUGFIX] Handle function switch in page module

Switching from "Languages" to "Columns" mode
in the page module, while having "All languages"
selected, the grid was previously empty, due to
a missing fallback.

The special "-1" is no valid language id in the
"Columns" mode and has to be replaced in
the module settings. We therefore fall back
to the default language, which is in this case
already visually selected for the user, since it's
the first module menu entry.

Resolves: #95161
Related: #92460
Releases: master
Change-Id: I68d242d1fc85fcc9fb48daf7d28298ee70fc7fcf

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Benni Mack's avatarBenni Mack <>
Tested-by: Georg Ringer's avatarGeorg Ringer <>
Reviewed-by: Benni Mack's avatarBenni Mack <>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <>
parent cd399d1a
......@@ -289,6 +289,11 @@ class PageLayoutController
if ((int)$this->MOD_SETTINGS['function'] !== 2) {
// Remove -1 (all) from the module menu if not "languages" mode
// In case -1 (all) is still set as language, but we are no longer in
// "languages" mode, we fall back to the default, preventing an empty grid.
if ((int)$this->MOD_SETTINGS['language'] === -1) {
$this->MOD_SETTINGS['language'] = 0;
// Make action menu from available actions
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