[!!!][TASK] Deprecate the field select_key of tt_content 34/49934/8
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 13 Sep 2016 18:12:06 +0000 (20:12 +0200)
committerBenni Mack <benni@typo3.org>
Fri, 27 Jan 2017 11:10:13 +0000 (12:10 +0100)
The field `select_key` is not used by the core and
is moved to the EXT:compatibility7.

Resolves: #77934
Releases: master
Change-Id: Ied7fa722c1bccb314fd02229da407613fbce7dfe
Reviewed-on: https://review.typo3.org/49934
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
16 files changed:
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/compatibility7/Configuration/TCA/Overrides/tt_content.php
typo3/sysext/compatibility7/ext_tables.sql
typo3/sysext/context_help/Resources/Private/Language/locallang_csh_ttcontent.xlf
typo3/sysext/core/Documentation/Changelog/master/Breaking-77934-RemoveSelectKeyFromContentElementPreview.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Deprecation-77934-DeprecateTt_contentFieldSelect_key.rst [new file with mode: 0644]
typo3/sysext/css_styled_content/Configuration/TCA/Overrides/tt_content.php
typo3/sysext/css_styled_content/Configuration/TypoScript/v7/setup.txt
typo3/sysext/css_styled_content/Tests/Functional/Tca/ContentVisibleFieldsTest.php
typo3/sysext/css_styled_content/static/setup.txt
typo3/sysext/fluid_styled_content/Configuration/TypoScript/ContentElement/List.txt
typo3/sysext/frontend/Configuration/TCA/tt_content.php
typo3/sysext/frontend/Tests/Functional/Tca/ContentVisibleFieldsTest.php
typo3/sysext/frontend/ext_tables.sql
typo3/sysext/indexed_search/Configuration/TCA/Overrides/tt_content.php
typo3/sysext/t3editor/Resources/Public/JavaScript/parse_typoscript/tokenizetyposcript.js

index 09ad086..fbd001c 100644 (file)
@@ -1791,9 +1791,6 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                             $message = sprintf($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.noMatchingValue'), $row['list_type']);
                             $out .= '<span class="label label-warning">' . htmlspecialchars($message) . '</span>';
                         }
-                    } elseif (!empty($row['select_key'])) {
-                        $out .= htmlspecialchars($this->getLanguageService()->sL(BackendUtility::getItemLabel('tt_content', 'select_key')))
-                            . ' ' . htmlspecialchars($row['select_key']) . '<br />';
                     } else {
                         $out .= '<strong>' . $this->getLanguageService()->getLL('noPluginSelected') . '</strong>';
                     }
index 43258e1..2bd8202 100644 (file)
@@ -1,10 +1,26 @@
 <?php
 defined('TYPO3_MODE') or die();
 
+$fields = [
+    'select_key' => [
+        'exclude' => true,
+        'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.code',
+        'config' => [
+            'type' => 'input',
+            'size' => 50,
+            'max' => 80,
+            'eval' => 'trim'
+        ]
+    ],
+];
+
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $fields);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tt_content', 'select_key;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:select_key_formlabel', 'list', 'after:list_type');
+
 // Register "old" FE plugin and hide layout, select_key and pages fields in BE
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
     ['LLL:EXT:indexed_search/Resources/Private/Language/locallang_main.xlf:mod_indexed_search', 'indexed_search'],
     'list_type',
     'indexed_search'
 );
-$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['indexed_search'] = 'layout,select_key,pages';
+$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['indexed_search'] = 'layout,pages';
index f6e29a8..7f092c2 100644 (file)
@@ -4,3 +4,10 @@
 CREATE TABLE pages (
        url_scheme tinyint(3) unsigned DEFAULT '0' NOT NULL
 );
+
+#
+# Table structure for table 'tt_content'
+#
+CREATE TABLE tt_content (
+       select_key varchar(80) DEFAULT '' NOT NULL
+);
index bb81f08..eb560f3 100644 (file)
@@ -533,16 +533,6 @@ tt_content:sectionIndex</source>
                                <source>EXT:context_help/Resources/Public/Images/cshimages/ttcontent_7.png</source>
                                <note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
                        </trans-unit>
-                       <trans-unit id="select_key.description">
-                               <source>Enter a special string to define the Content Element's operation or leave it blank for the default mode. Possible values depend on the Content Element being used.</source>
-                       </trans-unit>
-                       <trans-unit id="select_key.details">
-                               <source>Whether or not the content of this field is used and how it's intepreted depends on the Content Element and/or plugin being used. It is considered obsolete for plugins today, but is used in some Content Elements such as File Links.</source>
-                       </trans-unit>
-                       <trans-unit id="_select_key.seeAlso">
-                               <source>tt_content:list_type</source>
-                               <note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
-                       </trans-unit>
                        <trans-unit id="table_bgColor.description">
                                <source>Select the table background color.</source>
                        </trans-unit>
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-77934-RemoveSelectKeyFromContentElementPreview.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-77934-RemoveSelectKeyFromContentElementPreview.rst
new file mode 100644 (file)
index 0000000..c10c5e5
--- /dev/null
@@ -0,0 +1,32 @@
+.. include:: ../../Includes.txt
+
+===========================================================
+Breaking: #77934 - RemoveSelectKeyFromContentElementPreview
+===========================================================
+
+See :issue:`77934`
+
+Description
+===========
+
+The value of the field `select_key` has been shown in the preview of a content element in the page module. This field has been removed and therefore also the preview has been removed.
+
+
+Impact
+======
+
+The preview of this field is not available anymore
+
+
+Affected Installations
+======================
+
+Every installation or 3rd party extension which uses the field
+
+
+Migration
+=========
+
+No migration available
+
+.. index:: Backend
\ No newline at end of file
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-77934-DeprecateTt_contentFieldSelect_key.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-77934-DeprecateTt_contentFieldSelect_key.rst
new file mode 100644 (file)
index 0000000..b820894
--- /dev/null
@@ -0,0 +1,32 @@
+.. include:: ../../Includes.txt
+
+===========================================================
+Deprecation: #77934 - Deprecate tt_content field select_key
+===========================================================
+
+See :issue:`77934`
+
+Description
+===========
+
+The field `select_key` of the table `tt_content` is not used in the core and has been removed.
+
+
+Impact
+======
+
+The field `select_key` is not available by default anymore.
+
+
+Affected Installations
+======================
+
+All installations and extensions using the field `select_key` of the table `tt_content`.
+
+
+Migration
+=========
+
+Install the extension `compatibility7` to enable the field again.
+
+.. index:: TCA
\ No newline at end of file
index 71ed308..6f15b7b 100644 (file)
@@ -707,7 +707,6 @@ $GLOBALS['TCA']['tt_content']['types']['list']['showitem'] = '
         --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,
     --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.plugin,
         list_type;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:list_type_formlabel,
-        select_key;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:select_key_formlabel,
         pages;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:pages.ALT.list_formlabel,
         recursive,
     --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
index a6948b2..0a5ed3d 100644 (file)
@@ -1226,9 +1226,6 @@ tt_content.uploads {
 
                collections.field = file_collections
 
-               # get from path (backwards compatibility, contains strings like "fileadmin/user_uploads/")
-               folders.field = select_key
-
                sorting.field = filelink_sorting
 
                # render the files
@@ -1736,7 +1733,7 @@ tt_content.list {
        20.key.field = list_type
 
        20.stdWrap {
-               editIcons = tt_content: list_type, layout, select_key, pages [recursive]
+               editIcons = tt_content: list_type, layout, pages [recursive]
                editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.plugin
 
                prefixComment = 2 | Plugin inserted:
index 8ce8f1e..e87f35e 100644 (file)
@@ -112,7 +112,6 @@ class ContentVisibleFieldsTest extends \TYPO3\CMS\Components\TestingFramework\Co
         'list' => [
             'additionalFields' => [
                 'list_type',
-                'select_key',
                 'pages',
                 'recursive',
             ],
index e02e81b..3fd604b 100644 (file)
@@ -1226,9 +1226,6 @@ tt_content.uploads {
 
                collections.field = file_collections
 
-               # get from path (backwards compatibility, contains strings like "fileadmin/user_uploads/")
-               folders.field = select_key
-
                sorting.field = filelink_sorting
 
                # render the files
@@ -1735,7 +1732,7 @@ tt_content.list {
        20.key.field = list_type
 
        20.stdWrap {
-               editIcons = tt_content: list_type, layout, select_key, pages [recursive]
+               editIcons = tt_content: list_type, layout, pages [recursive]
                editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.plugin
 
                prefixComment = 2 | Plugin inserted:
index cb0b749..21a4860 100644 (file)
@@ -7,7 +7,7 @@ tt_content.list =< lib.fluidContent
 tt_content.list {
     templateName = List
     stdWrap {
-        editIcons = tt_content: header [header_layout], list_type, layout, select_key, pages [recursive]
+        editIcons = tt_content: header [header_layout], list_type, layout, pages [recursive]
         editIcons {
             iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.list
         }
index 564df60..fa32bf3 100644 (file)
@@ -782,16 +782,6 @@ return [
                 'authMode_enforce' => 'strict'
             ]
         ],
-        'select_key' => [
-            'exclude' => true,
-            'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.code',
-            'config' => [
-                'type' => 'input',
-                'size' => 50,
-                'max' => 80,
-                'eval' => 'trim'
-            ]
-        ],
         'file_collections' => [
             'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:file_collections',
             'config' => [
index d839cf9..d51cd02 100644 (file)
@@ -102,7 +102,6 @@ class ContentVisibleFieldsTest extends \TYPO3\CMS\Components\TestingFramework\Co
         'list' => [
             'additionalFields' => [
                 'list_type',
-                'select_key',
                 'pages',
                 'recursive',
             ],
index 848af2f..b39f88e 100644 (file)
@@ -274,7 +274,6 @@ CREATE TABLE tt_content (
        header_layout varchar(30) DEFAULT '0' NOT NULL,
        menu_type varchar(30) DEFAULT '0' NOT NULL,
        list_type varchar(255) DEFAULT '' NOT NULL,
-       select_key varchar(80) DEFAULT '' NOT NULL,
        sectionIndex tinyint(3) unsigned DEFAULT '0' NOT NULL,
        linkToTop tinyint(3) unsigned DEFAULT '0' NOT NULL,
        file_collections text,
index 724107d..0542316 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 defined('TYPO3_MODE') or die();
 
-// Registers "new" extbase based FE plugin and hide layout, select_key, pages and recursive fields in BE
+// Registers "new" extbase based FE plugin and hide layout, pages and recursive fields in BE
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
     'TYPO3.CMS.IndexedSearch',
     'Pi2',
     'Indexed Search (Extbase & Fluid based)'
 );
-$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['indexedsearch_pi2'] = 'layout,select_key,pages,recursive';
+$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['indexedsearch_pi2'] = 'layout,pages,recursive';
index ac5f13e..b0a6b12 100644 (file)
@@ -780,7 +780,6 @@ var typoscriptWords = {
        'section': 'reserved',
        'sectionIndex': 'reserved',
        'select': 'keyword2',
-       'select_key': 'reserved',
        'selectFields': 'reserved',
        'separator': 'reserved',
        'set': 'reserved',