Commit d85d3626 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Calculate action menu generation earlier in PageLayoutController

With #95387 the menu generation of the page module
was moved to the end of the request handling method.

However, the `makeActionMenu()` method does currently
not only create the menu but does also make some sanity
check, whether the currently selected `function` is actually
available.

If not, the `function` is reset to the default ("columns mode").
This e.g. happens when in languages mode and then switching
to another domain / another site, which is single language only.
This then led to the user being unable to work in "columns mode",
since no action menu is generated for such sites.

This is now fixed by executing the mentioned method before the
content gets generated.

Resolves: #96084
Related: #95387
Releases: main, 11.5
Change-Id: Iadb67ece1724b6d34a4724d7782bdd295cece642
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72971


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent 9ec3a1b4
...@@ -211,6 +211,10 @@ class PageLayoutController ...@@ -211,6 +211,10 @@ class PageLayoutController
$this->menuConfig($request); $this->menuConfig($request);
// Setting sys language from session var // Setting sys language from session var
$this->current_sys_language = (int)$this->MOD_SETTINGS['language']; $this->current_sys_language = (int)$this->MOD_SETTINGS['language'];
// Create LanguageMenu
$this->makeLanguageMenu();
// Make action menu from available actions
$this->makeActionMenu();
$this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Recordlist/ClearCache'); $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Recordlist/ClearCache');
$this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/NewContentElementWizardButton'); $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/NewContentElementWizardButton');
...@@ -615,10 +619,6 @@ class PageLayoutController ...@@ -615,10 +619,6 @@ class PageLayoutController
// Setting up the buttons for the docheader // Setting up the buttons for the docheader
$this->makeButtons($request); $this->makeButtons($request);
$this->initializeClipboard($request); $this->initializeClipboard($request);
// Create LanguageMenu
$this->makeLanguageMenu();
// Make action menu from available actions
$this->makeActionMenu();
} else { } else {
$content .= ImmediateActionElement::moduleStateUpdate('web', (int)$this->id); $content .= ImmediateActionElement::moduleStateUpdate('web', (int)$this->id);
$content .= '<h1>' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '</h1>'; $content .= '<h1>' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '</h1>';
......
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