Actions
Bug #54530
closedFAL Media Element cannot be expanded when fieldname contains undescores
Start date:
2013-12-20
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
When adding a new field to a existing table (e.g. pages) for adding Media (Images with custom palette) as IRRE, this field's name cannot have undescores ("_") in its name.
Otherwise the created IRRE Data cannot be expanded when saving this page and editing it again.
NOT working:
ext_tables.sql
[...]
# # Table structure for table 'pages' # CREATE TABLE pages ( slideshow tinyint(1) unsigned DEFAULT '0' NOT NULL, dynamic_header_images int(11) unsigned DEFAULT '0' NOT NULL, );
[...]
ext_tables.php
[...]
$addColumnArray = array( 'slideshow' => array( 'exclude' => 1, 'label' => 'LLL:EXT:mp_dynamicheader/Resources/Private/Language/locallang_db.xlf:slideshow_on_off', 'config' => array( 'type' => 'check' ) ), '*dynamic_header_images*' => array( 'exclude' => 1, 'label' => 'LLL:EXT:mp_dynamicheader/Resources/Private/Language/locallang_db.xlf:dynamic_header_images', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('*dynamic_header_images*', array( 'appearance' => array( 'createNewRelationLinkTitle' => 'LLL:EXT:mp_dynamicheader/Resources/Private/Language/locallang_db.xlf:*dynamic_header_images*.add_reference', ), 'foreign_types' => array( '0' => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ) ) ), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] ), ), ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $addColumnArray); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', '--div--;LLL:EXT:mp_dynamicheader/Resources/Private/Language/locallang_db.xlf:dynamic_header_tab,slideshow,*dynamic_header_images*'); $addColumnArray = array( 'headline' => array( 'exclude' => 1, 'label' => 'LLL:EXT:mp_dynamicheader/Resources/Private/Language/locallang_db.xlf:headline', 'config' => array( 'type' => 'input', 'size' => 48, 'max' => 256 ) ), ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('sys_file_reference', $addColumnArray); $GLOBALS['TCA']['sys_file_reference']['palettes']['dynamicHeaderPalette'] = array( 'showitem' => 'title,alternative;;;;3-3-3,--linebreak--,link,description,--linebreak--,headline', 'canNotCollapse' => TRUE );
[...]
working:
ext_tables.sql
[...]
# # Table structure for table 'pages' # CREATE TABLE pages ( slideshow tinyint(1) unsigned DEFAULT '0' NOT NULL, dynamicheaderimages int(11) unsigned DEFAULT '0' NOT NULL, );
[...]
ext_tables.php
[...]
$addColumnArray = array( 'slideshow' => array( 'exclude' => 1, 'label' => 'LLL:EXT:mp_dynamicheader/Resources/Private/Language/locallang_db.xlf:slideshow_on_off', 'config' => array( 'type' => 'check' ) ), '*dynamicheaderimages*' => array( 'exclude' => 1, 'label' => 'LLL:EXT:mp_dynamicheader/Resources/Private/Language/locallang_db.xlf:dynamicheaderimages', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('*dynamicheaderimages*', array( 'appearance' => array( 'createNewRelationLinkTitle' => 'LLL:EXT:mp_dynamicheader/Resources/Private/Language/locallang_db.xlf:*dynamicheaderimages*.add_reference', ), 'foreign_types' => array( '0' => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;dynamicHeaderPalette, --palette--;;filePalette' ) ) ), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] ), ), ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $addColumnArray); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', '--div--;LLL:EXT:mp_dynamicheader/Resources/Private/Language/locallang_db.xlf:dynamic_header_tab,slideshow,*dynamicheaderimages*'); $addColumnArray = array( 'headline' => array( 'exclude' => 1, 'label' => 'LLL:EXT:mp_dynamicheader/Resources/Private/Language/locallang_db.xlf:headline', 'config' => array( 'type' => 'input', 'size' => 48, 'max' => 256 ) ), ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('sys_file_reference', $addColumnArray); $GLOBALS['TCA']['sys_file_reference']['palettes']['dynamicHeaderPalette'] = array( 'showitem' => 'title,alternative;;;;3-3-3,--linebreak--,link,description,--linebreak--,headline', 'canNotCollapse' => TRUE );
[...]
Files
Actions