[!!!][TASK] RTE: Remove tt_content rte_enabled and flag handling 80/40380/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 17 Jun 2015 18:01:20 +0000 (20:01 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 17 Jun 2015 19:27:17 +0000 (21:27 +0200)
The tt_content field rte_enabled is not really useful anymore, RTE
can be disabled on a per-user basis. The field is removed from DB
together with the "flag" handling.

Resolves: #67577
Releases: master
Change-Id: I214baf45228a91d2193b54fbbc9ee71632e39bdf
Reviewed-on: http://review.typo3.org/40380
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
Reviewed-by: Alina Fleser <afleser@arxia.com>
Tested-by: Alina Fleser <afleser@arxia.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/Configuration/TCA/sys_news.php
typo3/sysext/core/Documentation/Changelog/7.3/Deprecation-67229-TcaChanges.rst
typo3/sysext/core/Documentation/Changelog/master/Breaking-67577-RteEnabledFlagHandling.rst [new file with mode: 0644]
typo3/sysext/css_styled_content/Configuration/TCA/Overrides/tt_content.php
typo3/sysext/css_styled_content/static/setup.txt
typo3/sysext/css_styled_content/static/v6.2/setup.txt
typo3/sysext/frontend/Configuration/TCA/tt_content.php
typo3/sysext/frontend/ext_tables.sql
typo3/sysext/mediace/Configuration/TCA/Overrides/tt_content.php
typo3/sysext/rtehtmlarea/Classes/Form/Resolver/RichTextNodeResolver.php

index 105ffdd..8434120 100644 (file)
@@ -79,7 +79,7 @@ return array(
                                        )
                                )
                        ),
-                       'defaultExtras' => 'richtext:rte_transform[flag=rte_enabled|mode=ts_css]',
+                       'defaultExtras' => 'richtext:rte_transform[mode=ts_css]',
                )
        ),
        'types' => array(
index 302a871..2b92f1e 100644 (file)
@@ -231,5 +231,5 @@ construct on the fly and will throw deprecation warnings as soon as a record wit
 is opened in the backend.
 
 Typical migration of the 4th ``showitem`` parameter involves moving a RTE configuration like
-``richtext:rte_transform[flag=rte_enabled|mode=ts_css]`` or the ``type=text`` flags ``nowrap``, ``fixed-font``
+``richtext:rte_transform[mode=ts_css]`` or the ``type=text`` flags ``nowrap``, ``fixed-font``
 and ``enabled-tab`` to ``columnsOverrides``.
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-67577-RteEnabledFlagHandling.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-67577-RteEnabledFlagHandling.rst
new file mode 100644 (file)
index 0000000..41453b8
--- /dev/null
@@ -0,0 +1,54 @@
+================================================
+Breaking: #67577 - rte_enabled and flag handling
+================================================
+
+Description
+===========
+
+Content elements of type ``text`` and ``text with image`` contained a field "RTE enabled" that
+could be unchecked to disable the rich text editor. This field has been removed together with the
+``TCA`` richtext ``flag`` handling.
+
+
+Impact
+======
+
+The field is removed from database and the flag information is lost.
+
+
+Affected Installations
+======================
+
+All instances will no longer show the "RTE enabled" field below ``text`` and ``text with image``
+content elements below the text field, the ``TCA`` ``flag`` is obsolete, see example below.
+
+
+Migration
+=========
+
+A typical rich text configuration in ``TCA`` looked like:
+
+.. code-block:: php
+
+       'content' => array(
+               'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.text',
+               'config' => array(
+                       'type' => 'text',
+                       'cols' => '48',
+                       'rows' => '5',
+                       'wizards' => array(
+                               'RTE' => array(
+                                       ...
+                               )
+                       )
+               ),
+               'defaultExtras' => 'richtext:rte_transform[flag=otherField|mode=ts_css]',
+       ),
+
+
+With this configuration RTE was only rendered if ``otherField`` had the value 1. This flag is obsolete now:
+
+.. code-block:: php
+
+       'defaultExtras' => 'richtext:rte_transform[mode=ts_css]',
+
index da1d52d..80d2ef5 100644 (file)
@@ -547,7 +547,6 @@ $GLOBALS['TCA']['tt_content']['types']['text']['showitem'] = '
                --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,
                --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,
                bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext_formlabel,
-               rte_enabled;LLL:EXT:cms/locallang_ttc.xlf:rte_enabled_formlabel,
        --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance,
                --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames,
        --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,
@@ -565,14 +564,13 @@ $baseDefaultExtrasOfBodytext = '';
 if (!empty($GLOBALS['TCA']['tt_content']['columns']['bodytext']['defaultExtras'])) {
        $baseDefaultExtrasOfBodytext = $GLOBALS['TCA']['tt_content']['columns']['bodytext']['defaultExtras'] . ':';
 }
-$GLOBALS['TCA']['tt_content']['types']['text']['columnsOverrides']['bodytext']['defaultExtras'] = $baseDefaultExtrasOfBodytext . 'richtext:rte_transform[flag=rte_enabled|mode=ts_css]';
+$GLOBALS['TCA']['tt_content']['types']['text']['columnsOverrides']['bodytext']['defaultExtras'] = $baseDefaultExtrasOfBodytext . 'richtext:rte_transform[mode=ts_css]';
 
 // Field arrangement for CE "textpic"
 $GLOBALS['TCA']['tt_content']['types']['textpic']['showitem'] = '
                --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,
                --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,
                bodytext;Text,
-               rte_enabled;LLL:EXT:cms/locallang_ttc.xlf:rte_enabled_formlabel,
        --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.images,
                image,
                --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.imagelinks;imagelinks,
@@ -591,7 +589,7 @@ if (!is_array($GLOBALS['TCA']['tt_content']['types']['textpic']['columnsOverride
 if (!is_array($GLOBALS['TCA']['tt_content']['types']['textpic']['columnsOverrides']['bodytext'])) {
        $GLOBALS['TCA']['tt_content']['types']['textpic']['columnsOverrides']['bodytext'] = array();
 }
-$GLOBALS['TCA']['tt_content']['types']['textpic']['columnsOverrides']['bodytext']['defaultExtras'] = $baseDefaultExtrasOfBodytext . 'richtext:rte_transform[flag=rte_enabled|mode=ts_css]';
+$GLOBALS['TCA']['tt_content']['types']['textpic']['columnsOverrides']['bodytext']['defaultExtras'] = $baseDefaultExtrasOfBodytext . 'richtext:rte_transform[mode=ts_css]';
 
 // Field arrangement for CE "image"
 $GLOBALS['TCA']['tt_content']['types']['image']['showitem'] = '
index 3f02eb9..2484a30 100644 (file)
@@ -604,7 +604,7 @@ tt_content.text {
 
                parseFunc = < lib.parseFunc_RTE
 
-               editIcons = tt_content:bodytext, rte_enabled
+               editIcons = tt_content:bodytext
                editIcons.beforeLastTag = 1
                editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.bodytext
 
index faa4fe5..5b4978e 100644 (file)
@@ -615,7 +615,7 @@ tt_content.text {
 
                parseFunc = < lib.parseFunc_RTE
 
-               editIcons = tt_content:bodytext, rte_enabled
+               editIcons = tt_content:bodytext
                editIcons.beforeLastTag = 1
                editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.bodytext
 
index 3525454..869b4bf 100644 (file)
@@ -56,7 +56,7 @@ return array(
                        'html' => 'tt_content_html.gif'
                ),
                'thumbnail' => 'image',
-               'requestUpdate' => 'list_type,rte_enabled,menu_type',
+               'requestUpdate' => 'list_type,menu_type',
                'searchFields' => 'header,header_link,subheader,bodytext,pi_flexform'
        ),
        'interface' => array(
@@ -910,19 +910,6 @@ return array(
                                )
                        )
                ),
-               'rte_enabled' => array(
-                       'exclude' => 1,
-                       'label' => 'LLL:EXT:cms/locallang_ttc.xlf:rte_enabled',
-                       'config' => array(
-                               'type' => 'check',
-                               'showIfRTE' => 1,
-                               'items' => array(
-                                       '1' => array(
-                                               '0' => 'LLL:EXT:cms/locallang_ttc.xlf:rte_enabled.I.0'
-                                       )
-                               )
-                       )
-               ),
                'pi_flexform' => array(
                        'l10n_display' => 'hideDiff',
                        'label' => 'LLL:EXT:cms/locallang_ttc.xlf:pi_flexform',
index 8b539b9..bf581a3 100644 (file)
@@ -286,7 +286,6 @@ CREATE TABLE tt_content (
        date int(10) unsigned DEFAULT '0' NOT NULL,
        recursive tinyint(3) unsigned DEFAULT '0' NOT NULL,
        imageheight mediumint(8) unsigned DEFAULT '0' NOT NULL,
-       rte_enabled tinyint(4) DEFAULT '0' NOT NULL,
        sys_language_uid int(11) DEFAULT '0' NOT NULL,
        tx_impexp_origuid int(11) DEFAULT '0' NOT NULL,
        pi_flexform mediumtext,
index 72a43ea..1974825 100644 (file)
@@ -82,7 +82,7 @@ if (!is_array($GLOBALS['TCA']['tt_content']['types']['media']['columnsOverrides'
 if (!is_array($GLOBALS['TCA']['tt_content']['types']['media']['columnsOverrides']['bodytext'])) {
        $GLOBALS['TCA']['tt_content']['types']['media']['columnsOverrides']['bodytext'] = array();
 }
-$GLOBALS['TCA']['tt_content']['types']['media']['columnsOverrides']['bodytext']['defaultExtras'] = $baseDefaultExtrasOfBodytext . 'richtext:rte_transform[flag=rte_enabled|mode=ts_css]';
+$GLOBALS['TCA']['tt_content']['types']['media']['columnsOverrides']['bodytext']['defaultExtras'] = $baseDefaultExtrasOfBodytext . 'richtext:rte_transform[mode=ts_css]';
 
 $GLOBALS['TCA']['tt_content']['palettes']['multimediafiles'] = array(
        'showitem' => 'multimedia;LLL:EXT:cms/locallang_ttc.xlf:multimedia_formlabel, bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.multimedia_formlabel',
index 9efbdfa..773b2bb 100644 (file)
@@ -63,15 +63,8 @@ class RichTextNodeResolver implements NodeResolverInterface {
                        && $backendUser->isRTE()
                ) {
                        $specialConfiguration = BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']);
-                       // $parameters is a key=>value array from "defaultExtras" pipe separated rte_transform string
-                       $parameters = BackendUtility::getSpecConfParametersFromArray($specialConfiguration['rte_transform']['parameters']);
-
-                       if (
-                               // If "richtext" is within defaultExtras
-                               isset($specialConfiguration['richtext'])
-                               // rte_transform[flag=foo] means RTE should only be rendered if the value of db row field "foo" can be interpreted as TRUE
-                               && (!$parameters['flag'] || !$row[$parameters['flag']])
-                       ) {
+                       // If "richtext" is within defaultExtras
+                       if (isset($specialConfiguration['richtext'])) {
                                // Operates by reference on $row! 'pid' is changed ...
                                BackendUtility::fixVersioningPid($table, $row);
                                list($recordPid, $tsConfigPid) = BackendUtility::getTSCpidCached($table, $row['uid'], $row['pid']);