Issue Bug Closed

#21961collapseAll => 0 not working

Jari no-lastname-given 01/15/10, 12:09 updated 11/24/11, 11:14

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)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.