Project

General

Profile

Actions

Bug #102034

open

The treeConfig.startingPoints parameter does not work correctly in TYPO3 v 12 (Related to https://forge.typo3.org/issues/102015)

Added by Robert von Hackwitz 7 months ago. Updated 7 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Start date:
2023-09-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

Category_Tree.png (36.5 KB) Category_Tree.png Robert von Hackwitz, 2023-09-25 13:51
Backend_Group_Configuration.png (97.5 KB) Backend_Group_Configuration.png Robert von Hackwitz, 2023-09-25 13:51
New_Category_Creation.png (38.4 KB) New_Category_Creation.png Robert von Hackwitz, 2023-09-25 13:51
Page_Tree.png (34 KB) Page_Tree.png Robert von Hackwitz, 2023-09-25 13:51

Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #102015: Incorrect behavior of TCEFORM treeConfig.startingPointsNew2023-09-22

Actions
Actions #1

Updated by Andreas Kienast 7 months ago

  • Related to Bug #102015: Incorrect behavior of TCEFORM treeConfig.startingPoints added
Actions #2

Updated by Robert von Hackwitz 7 months 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

Actions

Also available in: Atom PDF