Issue Bug Resolved

#106559No access to sub categories when using category_perms + treeConfig.startingPoints

Renan Gautier 04/11/25, 13:51 updated 11/07/26, 19:05

Description

Using both group user permission and treeConfig.startingPoints on the same category result in not showing the sub categories for the editor :

clipboard-202504111537-s2x0p.png

*Expected behavior:*
Subcategories under the treeConfig.startingPoints category should be visible in the editor interface, as long as the user has access via Category Mounts.

*Actual behavior:*
Only the root category set by treeConfig.startingPoints is visible. Its children (subcategories) are not shown, despite being accessible via the group’s Category Mounts.

Steps to reproduce:
  1. Set TCEFORM.pages.categories.config.treeConfig.startingPoints = [id of a category with children]
  2. Assign a backend user group with Category Mounts including the same root category.
  3. Log in as a backend user from that group and open a page with a category field.
  4. Observe that only the root category is shown, not the subcategories.
Workaround :
  • Adding a subcategory to the treeConfig.startingPoints configuration make the other subcategories appear

Config : TCEFORM.pages.categories.config.treeConfig.startingPoints = 3,4

Result :
clipboard-202504111543-hillr.png

I can reproduce this issue with both TYPO3 V12 and V13.

Reviews 5

Files 3

History 1019

  1. Jonathan IROULIN commented <span data-processor="relativetime" data-value="2025-05-27T16:40:55+00:00" > 05/27/25, 16:40 </span>

    The situation we are encountering with Renan (my colleague) is linked to the fact that category 3 (in the example) has the parent field equal to 0.

    Case 1 : TCEFORM.pages.categories.config.treeConfig.startingPoints = 3

    The value 0 (parent field for category 3) is not present in

    $categoryMountPoints = $GLOBALS[‘BE_USER’]->getCategoryMountPoints();

    (https://git.typo3.org/typo3/typo3/-/blob/12.4/typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php?ref_type=heads#L59)

    And so

    $uidsInRootline = $this->findUidsInRootline($startingPoint);

    returns an empty array which then leads to the line

    https://git.typo3.org/typo3/typo3/-/blob/12.4/typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php?ref_type=heads#L70

    which force us to go to ‘lookUpCategoryMountPointInTreeNodes’ method which uses $treeNodeCollection as parametter.

    However,

    $treeNodeCollection = $treeData->getChildNodes();

    contains the child categories of category 3 but not category 3 itself.

    And in our case, the daughter categories have not been ticked in one of our user’s groups. So no categories are returned at all.

    Case 2: TCEFORM.pages.categories.config.treeConfig.startingPoints = 3,4

    This case works because when we execute findUidsInRootline(4) category number 3 is in the rootline of category number 4 and in $categoryMountPoints so
    $shallRepopulateTree is false and so the $treeData is not emptied.

    So in my opinion in order to solve this issue we must get the categorie 3 :

    1. included in $uidsInRootline if parent field value is equal to 0

    so we need to add (it works, need to check if it is not a access/security issue)

    else{
        $parentUids[] = $uid;
    }

    on line https://git.typo3.org/typo3/typo3/-/blob/12.4/typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php?ref_type=heads#L154

    or

    2. used in lookUpCategoryMountPointInTreeNodes methode

    (and i don’t have the updated code yet in mind)

    Without this, we are forced to tick all the categories accessible to groups each time a new category is created. This is impossible (and from every allowed treenode we have natural access to their childNodes).

  2. Jonathan IROULIN commented <span data-processor="relativetime" data-value="2025-05-28T04:21:21+00:00" > 05/28/25, 04:21 </span>

    I think this bug concern TYPO3 version 10 to master.

    On TYPO3 v9 it worked because :

    if (in_array($dataProvider->getRootUid(), $categoryMountPoints)) {
        return;
    }

    (https://git.typo3.org/typo3/typo3/-/blob/9.5/typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php?ref_type=heads#L78)
    was correct so we escaped the

    $treeData->removeChildNodes();

    from line 90.

  3. Alexander Grein commented and changed TYPO3 Version 12 14 PHP Version 8.2 8.3 <span data-processor="relativetime" data-value="2026-04-16T15:07:14+00:00" > 04/16/26, 15:07 </span>

    This issue become present again, because of this commit released with TYPO3 13.4.28:
    https://github.com/typo3/typo3/commit/ded18741090

  4. Oliver Bartsch commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-07T19:05:15+00:00" > 11/07/26, 19:05 </span>

    Applied in changeset commit:7751ff67416b67be6273bb3112d661bb183aa2d8.