Bug #89094
closedActive tab could not be determined after disabling some tabs via TCEFORM
100%
Description
Editor opens a tt_content element. Fields are via TCEFORM reduced to a minimum and the general (first) tab is completely disabled. The first tab, that is rendered will not get the active state.
Example based on tx_news plugin. Editor should only edit plugin and its settings but nothing else:
[page["uid"] == 1337]
TCEFORM {
tt_content {
header.disabled = 1
CType.disabled = 1
list_type.disabled = 1
pi_flexform {
news_pi1 {
sDEF {
settings\.orderBy.disabled = 1
settings\.orderDirection.disabled = 1
settings\.detailPid.disabled = 1
settings\.listPid.disabled = 1
settings\.media\.maxWidth.disabled = 1
}
}
}
}
}
[END]
If the editor opens this element, the tab "plugin" is not opened, because the state is not set to active like it should. The editor has to click the tab, to open it. [See attached images]
The reason is located in the file typo3/sysext/backend/Resources/Private/Templates/DocumentTemplate/Tabs.html or the place that creates {items}.
Every tab is availbale inside {items} even it is empty or disabled. Thus the following condition will not work, when the first or more tabs are disabled for usage.
{iteration.cycle} == {defaultTabIndex}
If {items} will not include not available tabs to the editor the condition would work as aspected.
Files