[TASK] Allow FrontendContentAdapter to be disabled 07/26807/9
authorSteffen Ritter <info@rs-websystems.de>
Tue, 14 Jan 2014 13:34:14 +0000 (14:34 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Fri, 21 Mar 2014 17:03:35 +0000 (18:03 +0100)
The FrontendContentAdapter transforms tt_content and pages records
within cObject to the format which they have been stored in in pre
6.x installations, so probably existing legacy TypoScript config
can deal with the same data.

This patchset introduces an AllConfiguration flag allowing to disable
that service. For new installations the service is disabled by default,
upgrading installations have the service enabled.

Resolves: #54979
Releases: 6.2
Change-Id: I254f5c170c3e6a9f5ee214c0fe0e7a58e080cf34
Reviewed-on: https://review.typo3.org/26807
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Alexander Stehlik
Tested-by: Alexander Stehlik
Reviewed-by: Stefan Neufeind
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
NEWS.md
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Configuration/FactoryConfiguration.php
typo3/sysext/frontend/Classes/ContentObject/ContentContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

diff --git a/NEWS.md b/NEWS.md
index ec843f6..62539ac 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -134,6 +134,16 @@ the introduction of the group "system".
 
 ### Frontend
 
+* Typoscript compatibility
+
+For new installations TYPO3 CMS 6.2 now uses the new format of tt_content and page
+records. If you're upgrading from a previous version the FrontendContentAdapter is
+activated, which converts those records back to the old format for you on the fly.
+
+If you manage to change your Typoscript to use the new format you should consider
+deactivating the Adapter with the Install Tool option [FE][activateContentAdapter]
+as the Adapter really slows down the system.
+
 * Minor API change in \TYPO3\CMS\Frontend\ContentObjectRenderer->getTreeList()
 
 getTreeList() got some cleanup and slightly changed its return result. Former
index 46faef1..f02868e 100644 (file)
@@ -716,6 +716,7 @@ return array(
                'XCLASS' => array()
        ),
        'FE' => array( // Configuration for the TypoScript frontend (FE). Nothing here relates to the administration backend!
+               'activateContentAdapter' => TRUE,               // Boolean: TYPO3 Frontend can transform tt_content and pages records using FAL back to into a format like DB records have been in pre 6.x, so legacy Typoscript can work with it. <strong><em>WARNING: THIS IS SLOW!</em></strong>
                'png_to_gif' => FALSE,          // Boolean: Enables conversion back to gif of all png-files generated in the frontend libraries. Notice that this leaves an increased number of temporary files in typo3temp/
                'addAllowedPaths' => '',                // Additional relative paths (comma-list) to allow TypoScript resources be in. Should be prepended with '/'. If not, then any path where the first part is like this path will match. That is: 'myfolder/ , myarchive' will match eg. 'myfolder/', 'myarchive/', 'myarchive_one/', 'myarchive_2/' ... No check is done to see if this directory actually exists in the root of the site. Paths are matched by simply checking if these strings equals the first part of any TypoScript resource filepath. (See class template, function init() in \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser)
                'allowedTempPaths' => '',               // Additional paths allowed for temporary images. Used with imgResource. Eg. 'alttypo3temp/,another_temp_dir/';
index 711935f..dae2c7e 100644 (file)
@@ -35,6 +35,7 @@ return array(
        ),
        'FE' => array(
                'loginSecurityLevel' => 'rsa',
+               'activateContentAdapter' => FALSE,
        ),
        'GFX' => array(
                'jpg_quality' => '80',
index 795afc0..f0e8032 100644 (file)
@@ -105,7 +105,9 @@ class ContentContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractCon
                                                                $_procObj->modifyDBRow($row, $conf['table']);
                                                        }
                                                }
-                                               \TYPO3\CMS\Core\Resource\Service\FrontendContentAdapterService::modifyDBRow($row, $conf['table']);
+                                               if ($GLOBALS['TYPO3_CONF_VARS']['FE']['activateContentAdapter']) {
+                                                       \TYPO3\CMS\Core\Resource\Service\FrontendContentAdapterService::modifyDBRow($row, $conf['table']);
+                                               }
                                                if (!$GLOBALS['TSFE']->recordRegister[($conf['table'] . ':' . $row['uid'])]) {
                                                        $this->cObj->currentRecordNumber++;
                                                        $cObj->parentRecordNumber = $this->cObj->currentRecordNumber;
index 2580f77..04180b4 100644 (file)
@@ -561,7 +561,7 @@ class ContentObjectRenderer {
         */
        public function start($data, $table = '') {
                global $TYPO3_CONF_VARS;
-               if (is_array($data) && !empty($data) && !empty($table)) {
+               if ($TYPO3_CONF_VARS['FE']['activateContentAdapter'] && is_array($data) && !empty($data) && !empty($table)) {
                        \TYPO3\CMS\Core\Resource\Service\FrontendContentAdapterService::modifyDBRow($data, $table);
                }
                $this->data = $data;