[BUGFIX] Move TCA modification of EXT:t3editor to TCA/Overrides 44/30944/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 20 Jun 2014 15:04:19 +0000 (17:04 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 21 Jun 2014 16:56:54 +0000 (18:56 +0200)
TCA manipulation code must no longer reside in ext_tables.php, but
moved to Configuration/TCA/Overrides/<tablename>.php. Leftovers
in ext_tables might disturb loading order of TCA changes and spoil
proper caching.

Change-Id: I1f92a7b536ffb19d30bb580ea30452fc488cd0f6
Resolves: #59705
Related: #59414
Releases: 6.3, 6.2
Reviewed-on: https://review.typo3.org/30944
Reviewed-by: Sebastian Fischer
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/t3editor/Configuration/TCA/Overrides/tt_content.php [new file with mode: 0644]
typo3/sysext/t3editor/ext_tables.php

diff --git a/typo3/sysext/t3editor/Configuration/TCA/Overrides/tt_content.php b/typo3/sysext/t3editor/Configuration/TCA/Overrides/tt_content.php
new file mode 100644 (file)
index 0000000..f3a27b6
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+if (TYPO3_MODE === 'BE') {
+       // Add the t3editor wizard on the bodytext field of tt_content
+       $GLOBALS['TCA']['tt_content']['columns']['bodytext']['config']['wizards']['t3editor'] = array(
+               'enableByTypeConfig' => 1,
+               'type' => 'userFunc',
+               'userFunc' => 'TYPO3\\CMS\\T3editor\\FormWizard->main',
+               'title' => 't3editor',
+               'icon' => 'wizard_table.gif',
+               'module' => array(
+                       'name' => 'wizard_table'
+               ),
+               'params' => array(
+                       'format' => 'html',
+                       'style' => 'width:98%; height: 60%;'
+               )
+       );
+
+       // Activate the t3editor only for type html
+       $GLOBALS['TCA']['tt_content']['types']['html']['showitem'] = str_replace('bodytext,', 'bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.html_formlabel;;nowrap:wizards[t3editor],', $GLOBALS['TCA']['tt_content']['types']['html']['showitem']);
+}
\ No newline at end of file
index 54d37f4..6f6670f 100644 (file)
@@ -10,23 +10,4 @@ if (TYPO3_MODE === 'BE') {
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('T3Editor_TSrefLoader::getTypes', 'TYPO3\\CMS\\T3editor\\TypoScriptReferenceLoader->processAjaxRequest');
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('T3Editor_TSrefLoader::getDescription', 'TYPO3\\CMS\\T3editor\\TypoScriptReferenceLoader->processAjaxRequest');
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('CodeCompletion::loadTemplates', 'TYPO3\\CMS\\T3editor\\CodeCompletion->processAjaxRequest');
-
-       // Add the t3editor wizard on the bodytext field of tt_content
-       $TCA['tt_content']['columns']['bodytext']['config']['wizards']['t3editor'] = array(
-               'enableByTypeConfig' => 1,
-               'type' => 'userFunc',
-               'userFunc' => 'TYPO3\\CMS\\T3editor\\FormWizard->main',
-               'title' => 't3editor',
-               'icon' => 'wizard_table.gif',
-               'module' => array(
-                       'name' => 'wizard_table'
-               ),
-               'params' => array(
-                       'format' => 'html',
-                       'style' => 'width:98%; height: 60%;'
-               )
-       );
-
-       // Activate the t3editor only for type html
-       $TCA['tt_content']['types']['html']['showitem'] = str_replace('bodytext,', 'bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.html_formlabel;;nowrap:wizards[t3editor],', $TCA['tt_content']['types']['html']['showitem']);
 }