Commit e7a907ec authored by Christian Eßl's avatar Christian Eßl Committed by Georg Ringer
Browse files

[BUGFIX] Fallback to default, if BackendLayout can no longer be resolved

In the new fluidbased page module view, if a previously configured
BackendLayout has been removed. (For instance, the extension providing
it has been removed), the module would throw an uncaught error, because
the script would try to call a method on a non-existing BackendLayout.

This patch fixes this problem by automatically falling back to the
"default" BackendLayout, if the requested one couldn't be provided.
This is the same way as the old PageLayoutView would have reacted to
this problem.

Resolves: #90479
Releases: master
Change-Id: I76127e9b53bcb0ac55875857ca11262a323c6013
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63370


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Claus Due's avatarClaus Due <claus@phpmind.net>
Tested-by: Kevin Appelt's avatarKevin Appelt <kevin.appelt@icloud.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Claus Due's avatarClaus Due <claus@phpmind.net>
Reviewed-by: Kevin Appelt's avatarKevin Appelt <kevin.appelt@icloud.com>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
parent e81619ee
......@@ -623,6 +623,14 @@ class PageLayoutController
$this->id
);
// If backend layout is not found available anymore, use default
if ($backendLayout === null) {
$backendLayout = $this->backendLayouts->getDataProviderCollection()->getBackendLayout(
'default',
$this->id
);
}
$configuration = $backendLayout->getDrawingConfiguration();
$configuration->setPageId($this->id);
$configuration->setDefaultLanguageBinding(!empty($this->modTSconfig['properties']['defLangBinding']));
......
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