Commit ffc7a7c7 authored by Oliver Hader's avatar Oliver Hader Committed by Oliver Hader
Browse files

[BUGFIX] Assign default values in TCA

Several fields don't have proper default values which also
cannot be defined in the SQL schema - since BLOB/TEXT fields
cannot have a DEFAULT assignment. The default values are now
defined via TCA.

Resolves: #66430
Releases: master
Change-Id: I765dc11387ab371da80e3d03814c312fdb25d203
Reviewed-on: http://review.typo3.org/42397


Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
parent 08cd9eb5
......@@ -527,7 +527,8 @@ return array(
'additionalSearchFields' => 'nav_title, alias, url'
)
)
)
),
'default' => 0
)
),
'shortcut_mode' => array(
......@@ -571,7 +572,8 @@ return array(
'suggest' => array(
'type' => 'suggest'
)
)
),
'default' => 0
)
),
'mount_pid' => array(
......@@ -588,7 +590,8 @@ return array(
'suggest' => array(
'type' => 'suggest'
)
)
),
'default' => 0
)
),
'keywords' => array(
......
......@@ -74,12 +74,14 @@ return array(
array('', 0)
),
'foreign_table' => 'sys_category',
'foreign_table_where' => 'AND sys_category.uid=###REC_FIELD_l10n_parent### AND sys_category.sys_language_uid IN (-1,0)'
'foreign_table_where' => 'AND sys_category.uid=###REC_FIELD_l10n_parent### AND sys_category.sys_language_uid IN (-1,0)',
'default' => 0
)
),
'l10n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -129,7 +131,8 @@ return array(
'exclude' => 0,
'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.description',
'config' => array(
'type' => 'text'
'type' => 'text',
'default' => '',
)
),
'parent' => array(
......@@ -149,7 +152,8 @@ return array(
'showHeader' => TRUE,
'maxLevels' => 99,
),
)
),
'default' => 0
)
),
'items' => array(
......
......@@ -69,7 +69,8 @@ return array(
),
'l10n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......
......@@ -68,7 +68,8 @@ return array(
),
'l10n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......
......@@ -51,13 +51,15 @@ return array(
array('', 0)
),
'foreign_table' => 'sys_file_metadata',
'foreign_table_where' => 'AND sys_file_metadata.uid=###REC_FIELD_l10n_parent### AND sys_file_metadata.sys_language_uid IN (-1,0)'
'foreign_table_where' => 'AND sys_file_metadata.uid=###REC_FIELD_l10n_parent### AND sys_file_metadata.sys_language_uid IN (-1,0)',
'default' => 0
)
),
'l10n_diffsource' => array(
'exclude' => 0,
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
't3ver_label' => array(
......@@ -85,6 +87,7 @@ return array(
'minitems' => 1,
'maxitems' => 1,
'size' => 1,
'default' => 0,
)
),
'title' => array(
......
......@@ -72,13 +72,15 @@ return array(
array('', 0)
),
'foreign_table' => 'sys_file_reference',
'foreign_table_where' => 'AND sys_file_reference.uid=###REC_FIELD_l10n_parent### AND sys_file_reference.sys_language_uid IN (-1,0)'
'foreign_table_where' => 'AND sys_file_reference.uid=###REC_FIELD_l10n_parent### AND sys_file_reference.sys_language_uid IN (-1,0)',
'default' => 0
)
),
'l10n_diffsource' => array(
'exclude' => 0,
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......
......@@ -47,6 +47,7 @@ $GLOBALS['TCA']['tt_content']['ctrl']['shadowColumnsForMovePlaceholders'] = 'tx_
'localizationMode' => 'select',
'localizeChildrenAtParentLocalization' => TRUE,
),
'default' => '',
)
),
'tx_irretutorial_flexform' => array(
......@@ -57,6 +58,7 @@ $GLOBALS['TCA']['tt_content']['ctrl']['shadowColumnsForMovePlaceholders'] = 'tx_
'ds' => array(
'default' => 'FILE:EXT:irre_tutorial/Configuration/FlexForms/tt_content_flexform.xml',
),
'default' => '',
)
),
)
......
......@@ -34,7 +34,8 @@ return array(
'items' => array(
array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
)
),
'default' => 0,
)
),
'l18n_parent' => array(
......@@ -48,11 +49,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_1ncsv_hotel',
'foreign_table_where' => 'AND tx_irretutorial_1ncsv_hotel.pid=###CURRENT_PID### AND tx_irretutorial_1ncsv_hotel.sys_language_uid IN (-1,0)',
'default' => 0
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -90,6 +93,7 @@ return array(
'localizationMode' => 'select',
'localizeChildrenAtParentLocalization' => TRUE,
),
'default' => ''
)
),
),
......@@ -102,4 +106,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -48,11 +48,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_1ncsv_offer',
'foreign_table_where' => 'AND tx_irretutorial_1ncsv_offer.pid=###CURRENT_PID### AND tx_irretutorial_1ncsv_offer.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -90,6 +92,7 @@ return array(
'localizationMode' => 'select',
'localizeChildrenAtParentLocalization' => TRUE,
),
'default' => ''
)
),
),
......@@ -102,4 +105,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -46,11 +46,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_1ncsv_price',
'foreign_table_where' => 'AND tx_irretutorial_1ncsv_price.pid=###CURRENT_PID### AND tx_irretutorial_1ncsv_price.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -90,4 +92,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -19,7 +19,7 @@ return array(
'origUid' => 't3_origuid',
// @see http://forge.typo3.org/issues/29278 which solves it implicitly in the Core
// 'shadowColumnsForNewPlaceholders' => 'parentid,parenttable',
'shadowColumnsForMovePlaceholders' => 'parentid,parenttable',
'shadowColumnsForMovePlaceholders' => 'parentid,parenttable,parentidentifier',
),
'interface' => array(
'showRecordFieldList' => 'sys_language_uid,l18n_parent,l18n_diffsource,hidden,title,offers'
......@@ -49,11 +49,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_1nff_hotel',
'foreign_table_where' => 'AND tx_irretutorial_1nff_hotel.pid=###CURRENT_PID### AND tx_irretutorial_1nff_hotel.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -67,11 +69,19 @@ return array(
'parentid' => array(
'config' => array(
'type' => 'passthrough',
'default' => 0
)
),
'parenttable' => array(
'config' => array(
'type' => 'passthrough',
'default' => ''
)
),
'parentidentifier' => array(
'config' => array(
'type' => 'passthrough',
'default' => ''
)
),
'title' => array(
......@@ -115,4 +125,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -19,7 +19,7 @@ return array(
'origUid' => 't3_origuid',
// @see http://forge.typo3.org/issues/29278 which solves it implicitly in the Core
// 'shadowColumnsForNewPlaceholders' => 'parentid,parenttable',
'shadowColumnsForMovePlaceholders' => 'parentid,parenttable',
'shadowColumnsForMovePlaceholders' => 'parentid,parenttable,parentidentifier',
),
'interface' => array(
'showRecordFieldList' => 'sys_language_uid,l18n_parent,l18n_diffsource,hidden,parentid,parenttable,title,prices'
......@@ -49,11 +49,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_1nff_offer',
'foreign_table_where' => 'AND tx_irretutorial_1nff_offer.pid=###CURRENT_PID### AND tx_irretutorial_1nff_offer.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -67,11 +69,19 @@ return array(
'parentid' => array(
'config' => array(
'type' => 'passthrough',
'default' => 0
)
),
'parenttable' => array(
'config' => array(
'type' => 'passthrough',
'default' => ''
)
),
'parentidentifier' => array(
'config' => array(
'type' => 'passthrough',
'default' => ''
)
),
'title' => array(
......@@ -115,4 +125,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -19,7 +19,7 @@ return array(
'origUid' => 't3_origuid',
// @see http://forge.typo3.org/issues/29278 which solves it implicitly in the Core
// 'shadowColumnsForNewPlaceholders' => 'parentid,parenttable',
'shadowColumnsForMovePlaceholders' => 'parentid,parenttable',
'shadowColumnsForMovePlaceholders' => 'parentid,parenttable,parentidentifier',
),
'interface' => array(
'showRecordFieldList' => 'sys_language_uid,l18n_parent,l18n_diffsource,hidden,parentid,title,price'
......@@ -49,11 +49,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_1nff_price',
'foreign_table_where' => 'AND tx_irretutorial_1nff_price.pid=###CURRENT_PID### AND tx_irretutorial_1nff_price.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -67,11 +69,19 @@ return array(
'parentid' => array(
'config' => array(
'type' => 'passthrough',
'default' => 0
)
),
'parenttable' => array(
'config' => array(
'type' => 'passthrough',
'default' => ''
)
),
'parentidentifier' => array(
'config' => array(
'type' => 'passthrough',
'default' => ''
)
),
'title' => array(
......@@ -103,4 +113,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -46,11 +46,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_mnasym_hotel',
'foreign_table_where' => 'AND tx_irretutorial_mnasym_hotel.pid=###CURRENT_PID### AND tx_irretutorial_mnasym_hotel.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -102,4 +104,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -47,11 +47,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_mnasym_hotel_offer_rel',
'foreign_table_where' => 'AND tx_irretutorial_mnasym_hotel_offer_rel.pid=###CURRENT_PID### AND tx_irretutorial_mnasym_hotel_offer_rel.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -70,6 +72,7 @@ return array(
'foreign_table_where' => 'AND tx_irretutorial_mnasym_hotel.pid=###CURRENT_PID### AND tx_irretutorial_mnasym_hotel.sys_language_uid="###REC_FIELD_sys_language_uid###"',
'maxitems' => 1,
'localizeReferences' => 1,
'default' => 0,
)
),
'offerid' => array(
......@@ -80,6 +83,7 @@ return array(
'foreign_table_where' => 'AND tx_irretutorial_mnasym_offer.pid=###CURRENT_PID### AND tx_irretutorial_mnasym_offer.sys_language_uid="###REC_FIELD_sys_language_uid###"',
'maxitems' => 1,
'localizeReferences' => 1,
'default' => 0,
)
),
'prices' => array(
......@@ -120,4 +124,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -46,11 +46,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_mnasym_offer',
'foreign_table_where' => 'AND tx_irretutorial_mnasym_offer.pid=###CURRENT_PID### AND tx_irretutorial_mnasym_offer.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -102,4 +104,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -48,11 +48,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_mnasym_price',
'foreign_table_where' => 'AND tx_irretutorial_mnasym_price.pid=###CURRENT_PID### AND tx_irretutorial_mnasym_price.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -97,4 +99,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -46,11 +46,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_mnattr_hotel',
'foreign_table_where' => 'AND tx_irretutorial_mnattr_hotel.pid=###CURRENT_PID### AND tx_irretutorial_mnattr_hotel.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -102,4 +104,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -47,11 +47,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_mnattr_hotel_offer_rel',
'foreign_table_where' => 'AND tx_irretutorial_mnattr_hotel_offer_rel.pid=###CURRENT_PID### AND tx_irretutorial_mnattr_hotel_offer_rel.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -69,6 +71,7 @@ return array(
'foreign_table' => 'tx_irretutorial_mnattr_hotel',
'maxitems' => 1,
'localizeReferences' => 1,
'default' => 0,
)
),
'offerid' => array(
......@@ -78,6 +81,7 @@ return array(
'foreign_table' => 'tx_irretutorial_mnattr_offer',
'maxitems' => 1,
'localizeReferences' => 1,
'default' => 0,
)
),
'hotelsort' => array(
......@@ -121,4 +125,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
......@@ -46,11 +46,13 @@ return array(
),
'foreign_table' => 'tx_irretutorial_mnattr_offer',
'foreign_table_where' => 'AND tx_irretutorial_mnattr_offer.pid=###CURRENT_PID### AND tx_irretutorial_mnattr_offer.sys_language_uid IN (-1,0)',
'default' => 0,
)
),
'l18n_diffsource' => array(
'config' => array(
'type' => 'passthrough'
'type' => 'passthrough',
'default' => ''
)
),
'hidden' => array(
......@@ -102,4 +104,4 @@ return array(
'palettes' => array(
'1' => Array('showitem' => '')
)
);
\ No newline at end of file
);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment