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
Updated by Gerrit Code Review over 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63512
Updated by Gerrit Code Review over 4 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63572
Updated by Christian Eßl over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 72b8d66d10015a356474c47d41fb4c95d82eaa07.
Updated by Helmut Hummel over 4 years ago
- Related to Bug #91636: Hidden fieds are not rendered any more, when no other field is present in a tab added