Commit 3021b334 authored by Georg Ringer's avatar Georg Ringer Committed by Benni Mack
Browse files

[TASK] Always use fluid based page module

The feature toggle for `fluidBasedPageModule` is removed
to enforce the use of the new fluid based page module.

The already deprecated `PageLayoutView` will finally
be removed in a separate patch.

Resolves: #92870
Releases: master
Change-Id: I974a1b010cb14a545e80b7486f5f7c1f0083788e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66698

Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 8e102f49
......@@ -26,9 +26,7 @@ use TYPO3\CMS\Backend\Template\ModuleTemplate;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Backend\View\BackendLayoutView;
use TYPO3\CMS\Backend\View\PageLayoutContext;
use TYPO3\CMS\Backend\View\PageLayoutView;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Configuration\Features;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction;
......@@ -653,37 +651,25 @@ class PageLayoutController
$numberOfHiddenElements = $this->getNumberOfHiddenElements($configuration->getLanguageColumns());
if (GeneralUtility::makeInstance(Features::class)->isFeatureEnabled('fluidBasedPageModule')) {
$pageLayoutDrawer = $this->context->getBackendLayoutRenderer();
$pageLayoutDrawer = $this->context->getBackendLayoutRenderer();
$pageActionsCallback = null;
if ($this->context->isPageEditable()) {
$languageOverlayId = 0;
$pageLocalizationRecord = BackendUtility::getRecordLocalization('pages', $this->id, (int)$this->current_sys_language);
if (is_array($pageLocalizationRecord)) {
$pageLocalizationRecord = reset($pageLocalizationRecord);
}
if (!empty($pageLocalizationRecord['uid'])) {
$languageOverlayId = $pageLocalizationRecord['uid'];
}
$pageActionsCallback = 'function(PageActions) {
PageActions.setPageId(' . (int)$this->id . ');
PageActions.setLanguageOverlayId(' . $languageOverlayId . ');
}';
$pageActionsCallback = null;
if ($this->context->isPageEditable()) {
$languageOverlayId = 0;
$pageLocalizationRecord = BackendUtility::getRecordLocalization('pages', $this->id, (int)$this->current_sys_language);
if (is_array($pageLocalizationRecord)) {
$pageLocalizationRecord = reset($pageLocalizationRecord);
}
$this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/PageActions', $pageActionsCallback);
$tableOutput = $pageLayoutDrawer->drawContent();
} else {
$dbList = PageLayoutView::createFromPageLayoutContext($this->context);
// Setting up the tt_content columns to show
$colList = array_keys($backendLayout->getUsedColumns());
if ($this->colPosList !== '') {
$colList = array_intersect(GeneralUtility::intExplode(',', $this->colPosList), $colList);
if (!empty($pageLocalizationRecord['uid'])) {
$languageOverlayId = $pageLocalizationRecord['uid'];
}
// The order of the rows: Default is left(1), Normal(0), right(2), margin(3)
$dbList->tt_contentConfig['cols'] = implode(',', $colList);
$tableOutput = $dbList->getTable_tt_content($this->id);
$pageActionsCallback = 'function(PageActions) {
PageActions.setPageId(' . (int)$this->id . ');
PageActions.setLanguageOverlayId(' . $languageOverlayId . ');
}';
}
$this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/PageActions', $pageActionsCallback);
$tableOutput = $pageLayoutDrawer->drawContent();
}
if ($this->getBackendUser()->check('tables_select', 'tt_content') && $numberOfHiddenElements > 0) {
......
......@@ -64,6 +64,8 @@ class Features
* @var array
*/
protected $alwaysActiveFeatures = [
// Enabled in v11.0 at any time, feature switch will be completely ignored in TYPO3 v12.
'fluidBasedPageModule',
// Enabled in v10.0 at any time, feature switch will be completely ignored in TYPO3 v11.
'simplifiedControllerActionDispatching',
'unifiedPageTranslationHandling',
......
......@@ -71,7 +71,6 @@ return [
'fileCreateMask' => '0664',
'folderCreateMask' => '2775',
'features' => [
'fluidBasedPageModule' => false,
'form.legacyUploadMimeTypes' => true,
'redirects.hitCount' => false,
'unifiedPageTranslationHandling' => false,
......
......@@ -198,9 +198,6 @@ SYS:
type: container
description: 'New features of TYPO3 that are activated on new installations but upgrading installations can still use the old behaviour'
items:
fluidBasedPageModule:
type: bool
description: 'Use the rewritten page layout backend module which is based on Fluid. Can be toggled off to use the legacy PageLayoutView on installations which require the hooks etc. which are associated with PageLayoutView'
form.legacyUploadMimeTypes:
type: bool
description: 'If on, some mime types are predefined for the "FileUpload" and "ImageUpload" elements of the "form" extension which always allows file uploads of these types, no matter the specific form element definition.'
......
......@@ -23,7 +23,6 @@ return [
'SYS' => [
'sitename' => 'New TYPO3 site',
'features' => [
'fluidBasedPageModule' => true,
'unifiedPageTranslationHandling' => true,
],
],
......
.. include:: ../../Includes.txt
======================================================
Important: #92870 - Always use Fluid based page module
======================================================
See :issue:`92870`
Description
===========
With :issue:`90348` a completely rewritten page module has been added as
a replacement for the :php:`PageLayoutView`. As this replacement is stable
enough, the feature toggle to switch between the different implementations
has been removed.
Impact
======
The feature `fluidBasedPageModule` is now always enabled. Extension authors
can therefore remove any check regarding this feature as it will always return
:php:`true`.
.. index:: Backend, ext:backend
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