Bug #102034
openThe treeConfig.startingPoints parameter does not work correctly in TYPO3 v 12 (Related to https://forge.typo3.org/issues/102015)
0%
Description
Scenario:
1) A fresh TYPO3 v 12 installation
2) A page tree with 2 website root pages and a sysfolder (as in screenshot "Page_Tree.png")
3) A Category Tree in the sysfolder (as in screenshot "Category_Tree.png")
4) A backend usergroup named "Website A & B usergroup" that can manage both sites and has "Main Category 1" in Category Mounts (as in screenshot "Backend_Group.png")
5) On "Website A" page -> Resources this TSConfig: TCEFORM.sys_category.parent.config.treeConfig.startingPoints=3 (where "3" is the uid of the first subcategory of "Main Category 1"
if the backend user associated with the backend usergroup tries to create a new category on the "Website A" page he should be able to see in the "parent" field the sub-category "Sub Category Root for Website A" and its subcategories thanks to the parameter TCEFORM.sys_category.parent.config.treeConfig.startingPoints=3 Instead he just sees only "Sub Category Root for Website A" (as in screenshot "New_Category_Creation.png".
This is related to bug [[102015]]
Files
Updated by Andreas Kienast about 1 year ago
- Related to Bug #102015: Incorrect behavior of TCEFORM treeConfig.startingPoints added
Updated by Robert von Hackwitz about 1 year ago
Hi,
after a bit of investigation I think there is something wrong in
TYPO3\CMS\Backend\Security\CategoryPermissionsAspect around lines 68-80
foreach ($dataProvider->getStartingPoints() as $startingPoint) { if (!in_array($startingPoint, $categoryMountPoints)) { $shallRepopulateTree = true; break; } $uidsInRootline = $this->findUidsInRootline($startingPoint); if (empty(array_intersect($categoryMountPoints, $uidsInRootline))) { $shallRepopulateTree = true; break; } }
With the for loop we check whether startingpoints are present in the user's categorymounts,
but the starting points can be (as in my case) subcategories of a category mount points so the if statement is false, the variable $shallRepopulateTree is set to true and the cycle is interrupted, causing the reconstruction of the tree without the categories corresponding to the starting point