[BUGFIX] Move TCA modification of EXT:form to TCA/Overrides. 51/30651/5
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 10 Jun 2014 20:10:03 +0000 (22:10 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 21 Jun 2014 16:58:26 +0000 (18:58 +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: I789ea89318d76d0c709229139b0f5296042cded7
Resolves: #59466
Related: #59414
Releases: 6.3, 6.2
Reviewed-on: https://review.typo3.org/30651
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Sebastian Fischer
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php [new file with mode: 0644]
typo3/sysext/form/ext_tables.php

diff --git a/typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php b/typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php
new file mode 100644 (file)
index 0000000..35b9e42
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
+$GLOBALS['TCA']['tt_content']['columns']['bodytext']['config']['wizards']['forms'] = array(
+       'notNewRecords' => 1,
+       'enableByTypeConfig' => 1,
+       'type' => 'script',
+       'title' => 'Form wizard',
+       'icon' => 'wizard_forms.gif',
+       'module' => array(
+               'name' => 'wizard_form'
+       ),
+       'params' => array(
+               'xmlOutput' => 0
+       )
+);
+$GLOBALS['TCA']['tt_content']['types']['mailform']['showitem'] = '
+       CType;;4;;1-1-1,
+       hidden,
+       header;;3;;2-2-2,
+       linkToTop;;;;3-3-3,
+       --div--;LLL:EXT:cms/locallang_ttc.xlf:CType.I.8,
+       bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.mailform;;nowrap:wizards[forms];3-3-3,
+       --div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.access,
+       starttime,
+       endtime,
+       fe_group
+';
+
+// Add Default TS to Include static (from extensions)
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('form', 'Configuration/TypoScript/', 'Default TS');
index 8a97fcc..c9ea3b7 100644 (file)
@@ -3,39 +3,10 @@ if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 
-// Add Default TS to Include static (from extensions)
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/', 'Default TS');
-
 if (TYPO3_MODE === 'BE') {
        // Register wizard
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
                'wizard_form',
                \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Wizards/FormWizard/'
        );
-}
-
-$GLOBALS['TCA']['tt_content']['columns']['bodytext']['config']['wizards']['forms'] = array(
-       'notNewRecords' => 1,
-       'enableByTypeConfig' => 1,
-       'type' => 'script',
-       'title' => 'Form wizard',
-       'icon' => 'wizard_forms.gif',
-       'module' => array(
-               'name' => 'wizard_form'
-       ),
-       'params' => array(
-               'xmlOutput' => 0
-       )
-);
-$GLOBALS['TCA']['tt_content']['types']['mailform']['showitem'] = '
-       CType;;4;;1-1-1,
-       hidden,
-       header;;3;;2-2-2,
-       linkToTop;;;;3-3-3,
-       --div--;LLL:EXT:cms/locallang_ttc.xlf:CType.I.8,
-       bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.mailform;;nowrap:wizards[forms];3-3-3,
-       --div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.access,
-       starttime,
-       endtime,
-       fe_group
-';
+}
\ No newline at end of file