Project

General

Profile

Actions

Bug #90356

closed

options.pageTree.excludeDoktypes doesn't work with multiple items

Added by Marieke de Bruin about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Category:
Pagetree
Target version:
-
Start date:
2020-02-11
Due date:
% Done:

0%

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

Description

Here https://forge.typo3.org/issues/87581 the option is reintroduced in CMS9 but it isn't working like before

When you add multiple items it's only working for the last one

How to reproduce:
- make sure you have a 254 (folder) and 199 (menu separator) page in your pagetree
- add a backend usergroup with the following TSconfig: options.pageTree.excludeDoktypes = 254,199
- add the group to the current user
- refresh the pagetree, you will see only the menu separator is not shown in the pageTree but the folder is

I think the problem is here https://github.com/TYPO3-CMS/backend/blob/master/Classes/Tree/Repository/PageTreeRepository.php#L171
There is an array with two TYPO3\CMS\Core\Database\Query\Restriction\DocumentTypeExclusionRestriction but only the last one is added because they have the same type

I use TYPO3 version 9.5.13


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #87938: Avoid superfluous cast and creation of instances DocumentTypeExclusionRestrictionClosedManuel Selbach2019-03-16

Actions
Actions #1

Updated by Richard Haeser about 4 years ago

I can confirm this behaviour in current master as well

Actions #2

Updated by Richard Haeser about 4 years ago

  • Assignee set to Richard Haeser

It is indeed the problem that only 1 restriction of the same class can be added to QueryRestrictionContainer. In my opinion the DocumentTypeExclusionRestriction has to be changed to accept an int or an array of ints and use a notIn in the query. Will work on a patch tomorrow.

Actions #3

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/+/63239

Actions #4

Updated by Richard Haeser about 4 years ago

  • Is duplicate of Bug #87938: Avoid superfluous cast and creation of instances DocumentTypeExclusionRestriction added
Actions #5

Updated by Manuel Selbach about 4 years ago

  • Status changed from Under Review to Resolved
Actions #6

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF