Issue Bug Closed

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

Marieke de Bruin 02/11/20, 14:33 updated 02/27/20, 12:43

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

Reviews 1