Bug #21961
closedcollapseAll => 0 not working
0%
Description
Setting collapseAll => 0 had no effect for me, all items stayed collapsed.
I've experienced this issue with typo3 4.2.10 as well.
After investigating the source i've fixed this issue by modifieing
t3lib/class.t3lib_tceforms_inline.php
Replaced
$collapseAll = (isset($config['appearance']['collapseAll']) && $config['appearance']['collapseAll']);
with
$collapseAll = (!isset($config['appearance']['collapseAll']) || $config['appearance']['collapseAll']);
Replaced
if (!$isExpanded) {
$appearanceStyleFields = ' style="display: none;"';
}
with
if (!$isExpanded && $collapseAll) {
$appearanceStyleFields = ' style="display: none;"';
}
Seems like its working now but not well tested yet.
My TCA:
'attributes' => array (
'exclude' => 0,
'label' => 'LLL:EXT:book_entries/locallang_db.xml:tx_bookentries_entries.attributes',
'config' => array (
'type' => 'inline',
'foreign_table' => 'tx_bookentries_entries_attributes_mm',
'foreign_field' => 'entriesid',
'foreign_unique' => 'attributesid',
'foreign_label' => 'attributesid',
'appearance' => array(
'collapseAll' => 0,
),
)
),
(issue imported from #M13246)