Project

General

Profile

Actions

Bug #59440

closed

HMENU of the type special=categories shows hidden pages

Added by taywa gmbh almost 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
Content Rendering
Target version:
Start date:
2014-06-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

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.

Actions #1

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.

Actions #2

Updated by Francois Suter over 9 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.

Actions #3

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

Actions #4

Updated by Francois Suter over 9 years ago

Roman, please test and vote if you can.

Actions #5

Updated by Francois Suter over 9 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
Actions #6

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="[|]">
        }
    }

Actions #7

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.

Actions #8

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.

Actions #9

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

Actions #10

Updated by Francois Suter over 9 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF