Bug #52928
closedContent elements with hidden header are hidden in section index
100%
Description
Just noticed a behaviour change with 4.7, that could be ugly, when updating from 4.5 to 6.2. It was introduced with accessible content rendering #31767.
Before 4.7 you could build up a section index with links to elements with a hidden header. With the implementation in 4.7 you could not reenable this tricky, but well known, behaviour.
Since 4.7 elements with a hidden header are sorted out in the section index, what IMO doesn't make sense, because you have the extra flag "sectionIndex" for content elements to do this.
Changing/fixing this for 4.7 to 6.2 again would not be nice, but perhaps a additional flag like includeNotInMenu for menus could be a solution, if we call it a task and not a feature.
Updated by Gerrit Code Review about 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24876
Updated by Patrick Broens about 11 years ago
Are you sure this happened in 4.7? When comparing the code of 4.5 and 4.7 I only see refactoring, but not the actual change.
In 4.5
typo3/sysext/cms/tslib/class.tslib_menu.php
case 'header':
$selectSetup['andWhere'] .= ' AND header_layout!=100 AND header!=""';
break;
in 4.7
typo3/sysext/cms/tslib/class.tslib_menu.php
$isValidHeader = (intval($row['header_layout']) !== 100 && trim($row['header']) !== '');
Both are filtering out the hidden headers. As I can see nothing has been changed. When looking at the TSREF documents from 4.3 uuntil now the following is mentioned:
If this property is "header" then only content elements with a visible header-layout (and a non-empty 'header'-field!) is selected. In other words, if the header layout of an element is set to "Hidden" then the page will not appear in the menu.
Could you provide some code for 4.5 to show how it is working there for you? Are you using the parameter sectionIndex?
Updated by Patrick Broens about 11 years ago
- Status changed from Under Review to Needs Feedback
Updated by Marc Bastian Heinrichs about 11 years ago
- Status changed from Needs Feedback to Under Review
Hey Patrick,
thanks for digging into this.
Yes, I have to be more precise. You are right, the php implementation of menu option sectionIndex doesn't change for this behaviour.
But before 4.7 the menu type 3 (section index of a page) was rendered by typoscript only
3 < styles.content.get 3 { wrap = <ul class="csc-menu csc-menu-3">|</ul> select.andWhere = sectionIndex!=0 select.pidInList.override.field = pages renderObj = TEXT renderObj { fieldRequired = header trim = 1 field = header htmlSpecialChars = 1 wrap = <li class="csc-section">|</li> typolink.parameter.field = pid typolink.section.field = uid } }
In 4.7 this was changed to using sectionIndex like in menu type 7 (subpages to these pages + sections)
3 < .default 3 { special { value { override { data = page:uid if { isFalse.field = pages } } } } stdWrap { outerWrap = <ul class="csc-menu csc-menu-3">|</ul> } 1 = TMENU 1 { sectionIndex = 1 sectionIndex.type = header NO.wrapItemAndSub = <li class="csc-section">|</li> } }
So in versions lower 4.7 sorting out the elements with header_layout 100 in menu class was not relevant.
Updated by Patrick Broens about 11 years ago
Now it totally makes sense what you mean. Thanks for the explanation.
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24876
Updated by Gerrit Code Review over 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24876
Updated by Gerrit Code Review over 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24876
Updated by Gerrit Code Review over 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24876
Updated by Gerrit Code Review over 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24876
Updated by Gerrit Code Review over 10 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24876
Updated by Gerrit Code Review over 10 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24876
Updated by Marc Bastian Heinrichs over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d222e935f20d84e115d71bc9c03824c313a4095b.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed