diff --git a/typo3/sysext/backend/Classes/Utility/BackendUtility.php b/typo3/sysext/backend/Classes/Utility/BackendUtility.php index 7473e8e7949b17bf1785ccc206104caf7dcb2f72..937851912b48aabd4dc0a80262bea45ab2c752fc 100644 --- a/typo3/sysext/backend/Classes/Utility/BackendUtility.php +++ b/typo3/sysext/backend/Classes/Utility/BackendUtility.php @@ -352,7 +352,6 @@ class BackendUtility { 'doktype' => $val['doktype'], 'TSconfig' => $val['TSconfig'], 'is_siteroot' => $val['is_siteroot'], - 'storage_pid' => $val['storage_pid'], 't3ver_oid' => $val['t3ver_oid'], 't3ver_wsid' => $val['t3ver_wsid'], 't3ver_state' => $val['t3ver_state'], diff --git a/typo3/sysext/backend/Classes/View/PageLayoutView.php b/typo3/sysext/backend/Classes/View/PageLayoutView.php index 8a146ae01d020707909148a01013653d603e59bd..930eb162cec8ec0c9f05c2dff932f1207a03c38b 100644 --- a/typo3/sysext/backend/Classes/View/PageLayoutView.php +++ b/typo3/sysext/backend/Classes/View/PageLayoutView.php @@ -263,7 +263,6 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe 'cache_timeout', 'php_tree_stop', 'TSconfig', - 'storage_pid', 'is_siteroot', 'fe_login_mode' ); diff --git a/typo3/sysext/compatibility6/Configuration/TCA/Overrides/pages.php b/typo3/sysext/compatibility6/Configuration/TCA/Overrides/pages.php new file mode 100644 index 0000000000000000000000000000000000000000..8ea7a256d880799e364f23a228a48621866733e6 --- /dev/null +++ b/typo3/sysext/compatibility6/Configuration/TCA/Overrides/pages.php @@ -0,0 +1,41 @@ +<?php +defined('TYPO3_MODE') or die(); + +// Add "pages.storage_pid" field to TCA column +$additionalColumns = array( + 'storage_pid' => array( + 'exclude' => 1, + 'label' => 'LLL:EXT:lang/locallang_tca.xlf:storage_pid', + 'config' => array( + 'type' => 'group', + 'internal_type' => 'db', + 'allowed' => 'pages', + 'size' => '1', + 'maxitems' => '1', + 'minitems' => '0', + 'show_thumbs' => '1', + 'wizards' => array( + 'suggest' => array( + 'type' => 'suggest' + ) + ) + ) + ) +); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $additionalColumns); + +// Add palette +$GLOBALS['TCA']['pages']['palettes']['storage'] = array( + 'showitem' => 'storage_pid;LLL:EXT:cms/locallang_tca.xlf:pages.storage_pid_formlabel', + 'canNotCollapse' => 1 +); + +// Add to "normal" pages, "external URL", "shortcut page" and "storage PID" +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', + '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.storage;storage', + \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_DEFAULT . ',' + . \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_LINK . ',' + . \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SHORTCUT . ',' + . \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SYSFOLDER, + 'after:media' +); diff --git a/typo3/sysext/compatibility6/ext_tables.sql b/typo3/sysext/compatibility6/ext_tables.sql index 3b87c4ffd12afbc6b167894d7d63840c3f3b7412..3f46fc76fd88948ab68073721e61d231aef49d28 100644 --- a/typo3/sysext/compatibility6/ext_tables.sql +++ b/typo3/sysext/compatibility6/ext_tables.sql @@ -10,3 +10,10 @@ CREATE TABLE tt_content ( longdescURL text, titleText text ); + +# +# Table structure for table 'pages' +# +CREATE TABLE pages ( + storage_pid int(11) DEFAULT '0' NOT NULL +); diff --git a/typo3/sysext/core/Classes/Utility/RootlineUtility.php b/typo3/sysext/core/Classes/Utility/RootlineUtility.php index 3fd7d3e7291c863463ea1e06c61ff91151e75065..f92e6a809eb3392dcdd452d663bde00bb5af8c9b 100644 --- a/typo3/sysext/core/Classes/Utility/RootlineUtility.php +++ b/typo3/sysext/core/Classes/Utility/RootlineUtility.php @@ -86,7 +86,6 @@ class RootlineUtility { 'extendToSubpages', 'doktype', 'TSconfig', - 'storage_pid', 'is_siteroot', 'mount_pid', 'mount_pid_ol', diff --git a/typo3/sysext/core/Configuration/TCA/pages.php b/typo3/sysext/core/Configuration/TCA/pages.php index 36e86280a37f12a85fdc1cb27829f1db5e59b7a1..694acd3c2acbb9c089f9f0d41e2cbc064376a8c3 100644 --- a/typo3/sysext/core/Configuration/TCA/pages.php +++ b/typo3/sysext/core/Configuration/TCA/pages.php @@ -165,24 +165,6 @@ return array( ) ) ), - 'storage_pid' => array( - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_tca.xlf:storage_pid', - 'config' => array( - 'type' => 'group', - 'internal_type' => 'db', - 'allowed' => 'pages', - 'size' => '1', - 'maxitems' => '1', - 'minitems' => '0', - 'show_thumbs' => '1', - 'wizards' => array( - 'suggest' => array( - 'type' => 'suggest' - ) - ) - ) - ), 'tx_impexp_origuid' => array('config' => array('type' => 'passthrough')), 't3ver_label' => array( 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel', @@ -844,7 +826,6 @@ return array( --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.module;module, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.resources, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.media;media, - --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.storage;storage, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.config;config, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.extended, ' @@ -867,7 +848,6 @@ return array( --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.miscellaneous;miscellaneous, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.resources, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.media;media, - --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.storage;storage, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.config;config, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.extended, ' @@ -891,7 +871,6 @@ return array( --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.miscellaneous;miscellaneous, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.resources, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.media;media, - --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.storage;storage, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.config;config, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.extended, ' @@ -942,7 +921,6 @@ return array( --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.module;module, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.resources, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.media;media, - --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.storage;storage, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.config;config, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.extended, ' @@ -1050,9 +1028,6 @@ return array( 'media' => array( 'showitem' => 'media;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.media_formlabel', ), - 'storage' => array( - 'showitem' => 'storage_pid;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.storage_pid_formlabel', - ), 'config' => array( 'showitem' => 'TSconfig;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.TSconfig_formlabel', ) diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-65790-PagesStoragePidDeprecated.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-65790-PagesStoragePidDeprecated.rst new file mode 100644 index 0000000000000000000000000000000000000000..727dcb1d81daf967d198517ce7afa346e90bf840 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-65790-PagesStoragePidDeprecated.rst @@ -0,0 +1,30 @@ +======================================================== +Deprecation: #65790 - Remove pages.storage_pid and logic +======================================================== + +Description +=========== + +The DB field "pages.storage_pid" and its TCA definition are moved to the compatibility6 extension as the field +and its functionality is discouraged. + +Additionally the method ``getStorageSiterootPids()`` within the PHP class TypoScriptFrontendController is marked +for deprecation. The method is currently only used if the Frontend Login plugin is used without setting +a specific folder where the fe_users records are stored in. + + +Impact +====== + +Any usage of this field in any TypoScript, page or the usage of the method mentioned above in any third-party +extension will only work if the compatibility6 extension is installed. + +The Frontend Login functionality will throw a deprecation warning if the TypoScript option +``plugin.tx_felogin.storagePid`` (via TypoScript directly or the flexform configuraiton within the plugin) is not set. + + +Affected installations +====================== + +All installations making use of ``storage_pid`` within the pages database table as well as installations using +the Frontend Login plugin without having the storagePid option set. diff --git a/typo3/sysext/core/ext_tables.sql b/typo3/sysext/core/ext_tables.sql index 368b79d01d03fe7ffedad4dc07cf6bb8b52f07e0..f48c6a6fcdbd882c4368ed64a77101bed3cfb3dc 100644 --- a/typo3/sysext/core/ext_tables.sql +++ b/typo3/sysext/core/ext_tables.sql @@ -122,7 +122,6 @@ CREATE TABLE pages ( title varchar(255) DEFAULT '' NOT NULL, doktype int(11) unsigned DEFAULT '0' NOT NULL, TSconfig text, - storage_pid int(11) DEFAULT '0' NOT NULL, is_siteroot tinyint(4) DEFAULT '0' NOT NULL, php_tree_stop tinyint(4) DEFAULT '0' NOT NULL, tx_impexp_origuid int(11) DEFAULT '0' NOT NULL, diff --git a/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php b/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php index a404c9538a928d52583948eeea0a81a565fa01e4..3fc103cca2bcec48d6cca9d73e084fd18ffdbbdc 100644 --- a/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php +++ b/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php @@ -138,6 +138,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin $this->spid = $this->conf['storagePid']; } } else { + GeneralUtility::deprecationLog('Extension "felogin" must have a storagePid set via TypoScript or the plugin configuration.'); $pids = $this->frontendController->getStorageSiterootPids(); $this->spid = $pids['_STORAGE_PID']; } diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php index afb05878e04ed4d5b6dc3bfa046b34c6effaa45e..3b6210916bc7940d398cdcd9a5412e793e12f3ca 100644 --- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php +++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php @@ -4127,8 +4127,10 @@ class TypoScriptFrontendController { * Traverses the ->rootLine and returns an array with the first occurrance of storage pid and siteroot pid * * @return array Array with keys '_STORAGE_PID' and '_SITEROOT' set to the first occurrences found. + * @deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8. The usage of "storage_pid" is discouraged, the option for "is_siteroot" is handled via the RootlineUtility directly. */ public function getStorageSiterootPids() { + GeneralUtility::logDeprecatedFunction(); $res = array(); if (!is_array($this->rootLine)) { return array();