[!!!][TASK] Remove "content_doktypes" 38/54438/4
authorBenni Mack <benni@typo3.org>
Wed, 18 Oct 2017 18:41:21 +0000 (20:41 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Thu, 19 Oct 2017 08:13:00 +0000 (10:13 +0200)
The global option "content_doktypes" is
1. outdated (still contains doktypes 2 which was removed in 4.x)
2. only in use for Workspace Preview Links and Frontend Editing to query page trees

However, the idea was to disallow content editing (QuickEdit) and skip
search of other doktypes for simple DB search (removed in TYPO3 v7)

This is not the case anymore and nowadays a hidden feature which is only
10% implemented, and just another tedious option bloating the system.

The option has been removed and also cleaned via SilentConfigurationUpgradeService.

Resolves: #82803
Releases: master
Change-Id: I4ca868f721142d2ac9f1de0c1a7bccc33086989b
Reviewed-on: https://review.typo3.org/54438
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/backend/Classes/FrontendBackendUserAuthentication.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml
typo3/sysext/core/Documentation/Changelog/master/Breaking-82803-GlobalConfigurationOptionContent_doktypesRemoved.rst [new file with mode: 0644]
typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php

index cee3109..a89916c 100644 (file)
@@ -260,13 +260,6 @@ class FrontendBackendUserAuthentication extends BackendUserAuthentication
                 ->from('pages')
                 ->where(
                     $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($id, \PDO::PARAM_INT)),
-                    $queryBuilder->expr()->in(
-                        'doktype',
-                        $queryBuilder->createNamedParameter(
-                            $GLOBALS['TYPO3_CONF_VARS']['FE']['content_doktypes'],
-                            \PDO::PARAM_INT
-                        )
-                    ),
                     QueryHelper::stripLogicalOperatorPrefix($perms_clause)
                 )
                 ->execute();
index 526a705..b9705f0 100644 (file)
@@ -1025,7 +1025,6 @@ return [
             // array('IPmaskList_1','fe_group uid'), array('IPmaskList_2','fe_group uid')
         ],
         'get_url_id_token' => '#get_URL_ID_TOK#',
-        'content_doktypes' => '1,2,5,7',
         'enable_mount_pids' => true,
         'hidePagesIfNotTranslatedByDefault' => false,
         'eID_include' => [], // Array of key/value pairs where key is "tx_[ext]_[optional suffix]" and value is relative filename of class to include. Key is used as "?eID=" for \TYPO3\CMS\Frontend\Http\RequestHandlerRequestHandler to include the code file which renders the page from that point. (Useful for functionality that requires a low initialization footprint, eg. frontend ajax applications)
index be6523c..1c4b6d1 100644 (file)
@@ -415,9 +415,6 @@ FE:
         get_url_id_token:
             type: text
             description: 'This is the token, which is substituted in the output code in order to keep a GET-based session going. Normally the GET-session-id is 5 chars (''&amp;ftu='') + hash_length (norm. 10)'
-        content_doktypes:
-            type: list
-            description: 'List of pages.doktype values which can contain content (so shortcut pages and external url pages are excluded, but all pages below doktype 199 should be included. doktype=6 is not either (backend users only...).'
         enable_mount_pids:
             type: bool
             description: 'If enabled, the mount_pid feature allowing ''symlinks'' in the page tree (for frontend operation) is allowed.'
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-82803-GlobalConfigurationOptionContent_doktypesRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-82803-GlobalConfigurationOptionContent_doktypesRemoved.rst
new file mode 100644 (file)
index 0000000..64d98e7
--- /dev/null
@@ -0,0 +1,35 @@
+.. include:: ../../Includes.txt
+
+=========================================================================
+Breaking: #82803 - Global configuration option "content_doktypes" removed
+=========================================================================
+
+See :issue:`82803`
+
+Description
+===========
+
+The configuration option :php:`$TYPO3_CONF_VARS['FE']['content_doktypes']` which declared
+what pages.doktypes values could contain content elements, was removed.
+
+
+Impact
+======
+
+Using this option in custom code will lead to unexpected behaviour.
+
+Changing this option has no effect on TYPO3 Core anymore.
+
+
+Affected Installations
+======================
+
+Installations having this option explicitly set.
+
+
+Migration
+=========
+
+Remove all usages working with this option.
+
+.. index:: LocalConfiguration, NotScanned
\ No newline at end of file
index ad0bbee..5837868 100644 (file)
@@ -118,6 +118,8 @@ class SilentConfigurationUpgradeService
         'SYS/enableDeprecationLog',
         // #82680
         'GFX/png_truecolor',
+        // #82803
+        'FE/content_doktypes',
     ];
 
     public function __construct(ConfigurationManager $configurationManager = null)
index abf888b..3428030 100644 (file)
@@ -816,10 +816,7 @@ class WorkspaceService implements SingletonInterface
         if ($pageUid > 0 && $workspaceUid > 0) {
             $pageRecord = BackendUtility::getRecord('pages', $pageUid);
             BackendUtility::workspaceOL('pages', $pageRecord, $workspaceUid);
-            if (
-                !GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['FE']['content_doktypes'], $pageRecord['doktype'])
-                || VersionState::cast($pageRecord['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
-            ) {
+            if (VersionState::cast($pageRecord['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)) {
                 $result = false;
             }
         } else {