Project

General

Profile

Actions

Bug #89094

closed

Active tab could not be determined after disabling some tabs via TCEFORM

Added by Christian Stern over 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
Start date:
2019-09-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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

Bildschirmfoto vom 2019-09-05 19-43-57.png (185 KB) Bildschirmfoto vom 2019-09-05 19-43-57.png The tt_content element was opened. The tab is not active. Christian Stern, 2019-09-05 20:53
Bildschirmfoto vom 2019-09-05 19-44-02.png (179 KB) Bildschirmfoto vom 2019-09-05 19-44-02.png User need to click on the tab to see its content Christian Stern, 2019-09-05 20:53
Bildschirmfoto vom 2019-09-05 19-43-22.png (130 KB) Bildschirmfoto vom 2019-09-05 19-43-22.png Debug of {items} Christian Stern, 2019-09-05 21:04

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91636: Hidden fieds are not rendered any more, when no other field is present in a tabClosed2020-06-11

Actions
Actions #1

Updated by Gerrit Code Review about 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

Actions #2

Updated by Gerrit Code Review almost 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

Actions #3

Updated by Christian Eßl almost 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Benni Mack almost 4 years ago

  • Status changed from Resolved to Closed
Actions #5

Updated by Helmut Hummel over 3 years ago

  • Related to Bug #91636: Hidden fieds are not rendered any more, when no other field is present in a tab added
Actions

Also available in: Atom PDF