Project

General

Profile

Actions

Bug #96288

open

TCA type category not editable/shown for editors if startingPoints are set

Added by David Hoeckele over 2 years ago. Updated 12 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-12-08
Due date:
% Done:

0%

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

Description

If startingPoints are set, the categories won't be shown for editor users. When removing startingPoints, all categories are shown, even for editor.

Using it like this:

'categories' => [
    'exclude' => true,
    'label'   => $langFile . $table . '.categories',           
    'config' => [
        'type' => 'category',
        'treeConfig' => [
            'startingPoints' => '###SITE:categories.product###',
        ]
    ]
]

Setting an int value instead of site-config has the same effect. Also configuring it with tsconfig settings.
For the admin user everything works fine. Also checked user settings for editor, looks good to me.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #96397: Category starting points don't accept CSVClosed2021-12-20

Actions
Actions #1

Updated by Andreas Kienast over 2 years ago

Hello,

can you please tell how SITE:categories.product is defined? Do you use by chance a comma-separated value?

Kind regards
Andreas

Actions #2

Updated by Andreas Kienast over 2 years ago

  • Status changed from New to Needs Feedback
Actions #3

Updated by Andreas Kienast over 2 years ago

I've created https://forge.typo3.org/issues/96397 and pushed a patch to https://review.typo3.org/c/Packages/TYPO3.CMS/+/72738, can you please check whether this solves your issue?

Kind regards
Andreas

Actions #4

Updated by Benni Mack over 2 years ago

  • Related to Bug #96397: Category starting points don't accept CSV added
Actions #5

Updated by David Hoeckele over 2 years ago

Thanks for your reply - i have just configured one single integer value.

It's only an issue with the editors - the category selection appears empty if an startingPoint is configured. As an admin user i can see the categories with all possible variants (site config, TCA, TSconfig) and it works as expected ...

Actions #6

Updated by Cyrill Gsell about 2 years ago

I have the same problem, it happens when you set a spartingPoint in the TCA and set the same starting point as a category mount in the backend user group. I think the problem occurs at this point TYPO3\CMS\Backend\Security\CategoryPermissionsAspect::lookUpCategoryMountPointInTreeNodes; only the child nodes are checked if they are in one of the selected category mount points but not the parent node (startingPoint).

Actions #7

Updated by Florian Rival about 1 year ago

Same problem for me when I set the startingPoints through TCEFORM :

TCEFORM.tx_mytable.domaine.config.treeConfig.startingPoints = 10

but if I set two categories :

TCEFORM.tx_mytable.domaine.config.treeConfig.startingPoints = 10, 20

The problem disappears.
In method DatabaseTreeDataProvider::loadTreeData() , implementation is different if you have one startingPoint category or multiples startingPoints.

With one startingPoint, only sub-categories are stored in $this->treeData.
With multiple startingPoints, only TCEFORM.tx_mytable.domaine.config.treeConfig.startingPoints are stored in $this->treeData.

Actions #8

Updated by Gerrit Code Review about 1 year ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77642

Actions #9

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77642

Actions #10

Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77642

Actions #11

Updated by Gerrit Code Review 12 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77642

Actions

Also available in: Atom PDF