Bug #59440
closedHMENU of the type special=categories shows hidden pages
100%
Description
a menu created with TS using the new "categories" type will show disabled pages (also hidden in navigation and timed/start-stop pages)
it migth be a problem with "_sysext/frontend/Classes/ContentObject/Menu/CategoryMenuUtility.php_" but i think the enablefields should be handled in "/sysext/core/Classes/Category/Collection/CategoryCollection.php" which is used by CategoryMenuUtility
or
CategoryMenuUtility could use "sysext/frontend/Classes/Category/Collection/CategoryCollection.php" which seems to handle enableFields in it's "getCollectedRecords" function.
Updated by taywa gmbh almost 10 years ago
- it will also render deleted pages.
- i tested it again under 6.2.3 and the bug is still there.
Updated by Francois Suter almost 10 years ago
- Status changed from New to Accepted
- Assignee set to Francois Suter
- Target version set to next-patchlevel
- PHP Version set to 5.3
- Complexity set to easy
You're absolutely right. It will fetch absolutely any page, also workspace copies, etc.
The correct solution is to use \TYPO3\CMS\Frontend\Category\Collection\CategoryCollection
as you mention above. It was designed for this purpose.
I'll push a patch for this now.
Updated by Gerrit Code Review almost 10 years ago
- Status changed from Accepted 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 http://review.typo3.org/32064
Updated by Francois Suter almost 10 years ago
Roman, please test and vote if you can.
Updated by Francois Suter almost 10 years ago
How to reproduce:
- assign categories to a couple of pages
- hide or delete one of these pages
- display a menu of categorized pages on some page => the hidden or deleted page shows up
- apply the patch and reload the page => the hidden or deleted page does not show up anymore
Updated by taywa gmbh over 9 years ago
this only works for the content element 'special menus' (tested and confirmed). however, if the menu is created with typoscript, the deleted page still shows up. i don't know why. i'd expect it to work in both cases.
here is an example TS:
temp.projects = HMENU temp.projects.special = categories temp.projects.special{ value = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 sorting = sorting } temp.projects.1 < .temp.genericnav.1 temp.projects.1.wrap = <nav><ul id="overview">|</ul></nav> temp.projects.1.NO.before.dataWrap { field = _categories wrap = <li data-cats="[|]"> } }
Updated by taywa gmbh over 9 years ago
correction: the patch does work in both cases, but caching seems to be different: for the content element 'special menus' a page refresh is sufficient, for the typoscript the typo3 frontend cache has to be cleared and the browser needs a force reload (crtl + F5) - a simple refresh won't do.
Updated by Francois Suter over 9 years ago
Hi Roman, that's a perfectly normal cache behaviour (at least on the TYPO3 side; can't say for the browser). As TypoScript templates affect the whole site, clearing a single page's cache is not enough. You indeed have to clear the whole frontend cache.
Updated by Gerrit Code Review over 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32688
Updated by Francois Suter over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0a476dc0d89b74022e672b5494318ad15579b6e6.