[BUGFIX] load TCA before manipulation 71/17171/5
authorJigal van Hemert <jigal@xs4all.nl>
Sat, 15 Dec 2012 08:58:54 +0000 (09:58 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 2 Feb 2013 08:48:44 +0000 (09:48 +0100)
Load the TCA before manipulating the contents in form and
css_styled_content, otherwise the checks for later calls to
loadTCA will fail while the TCA is not fully loaded.

Change-Id: Id2d96d8dab0fc53661689f778871ebb078272062
Resolves: #38505
Releases: 6.1, 6.0, 4.7, 4.6, 4.5
Reviewed-on: https://review.typo3.org/17171
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/css_styled_content/ext_tables.php
typo3/sysext/form/ext_tables.php

index 86f4c9b..c38a02e 100755 (executable)
@@ -2,8 +2,13 @@
 if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
+
 // Add flexform
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:css_styled_content/flexform_ds.xml', 'table');
+
+// Load TCA before manipulating the column configuration
+\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
+
 $TCA['tt_content']['types']['table']['showitem'] = 'CType;;4;;1-1-1, hidden, header;;3;;2-2-2, linkToTop;;;;4-4-4,
                        --div--;LLL:EXT:cms/locallang_ttc.xml:CType.I.5, layout;;10;;3-3-3, cols, bodytext;;9;nowrap:wizards[table], text_properties, pi_flexform,
                        --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime, fe_group';
index 0ddea8f..6e636fa 100644 (file)
@@ -2,8 +2,13 @@
 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');
+
+// Load TCA before manipulating the column configuration
+\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
+
 $TCA['tt_content']['columns']['bodytext']['config']['wizards']['forms'] = array(
        'notNewRecords' => 1,
        'enableByTypeConfig' => 1,