Project

General

Profile

Actions

Bug #92489

closed

Calling $contentObjectRenderer->getTreeList() in eID returns empty list

Added by Xavier Perseguers over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-10-06
Due date:
% Done:

100%

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

Description

During Application's bootstrap, \TYPO3\CMS\Frontend\Http\Application::initializeContext() does that:

        GeneralUtility::makeInstance(Context::class, [
            'date' => new DateTimeAspect(new \DateTimeImmutable('@' . $GLOBALS['EXEC_TIME'])),
            'visibility' => new VisibilityAspect(),
            'workspace' => new WorkspaceAspect(0),
            'backend.user' => new UserAspect(null),
            'frontend.user' => new UserAspect(null, [0, -1]),
        ]);

this creates a default frontend.user aspect without any AbstractAuthenticationUser. As we see in the UserAspect constructor, this is totally legit and creates a stdClass object in such case:

    /**
     * @param AbstractUserAuthentication|null $user
     * @param array|null $alternativeGroups
     */
    public function __construct(AbstractUserAuthentication $user = null, array $alternativeGroups = null)
    {
        $this->user = $user ?? (object)['user' => []];
        $this->groups = $alternativeGroups;
    }

Problem is that the method ->getGroupUids() wrongly check for either a BackendUserAuthentication or a FrontendUserAuthentication for returning the associated groups, which can never occur in that context.

Due to this erroneous condition, the tree list is always empty!


Related issues 1 (0 open1 closed)

Blocks TYPO3 Core - Feature #92562: Resolve frontend user groups directly after fe_user initializationClosedBenni Mack2020-10-14

Actions
Actions #1

Updated by Gerrit Code Review over 3 years ago

  • Status changed from New to Under Review

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

Actions #2

Updated by Gerrit Code Review over 3 years ago

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

Actions #3

Updated by Gerrit Code Review over 3 years ago

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

Actions #4

Updated by Gerrit Code Review over 3 years ago

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

Actions #5

Updated by Gerrit Code Review over 3 years ago

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

Actions #6

Updated by Gerrit Code Review over 3 years ago

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

Actions #7

Updated by Markus Klein over 3 years ago

  • Blocks Feature #92562: Resolve frontend user groups directly after fe_user initialization added
Actions #8

Updated by Gerrit Code Review over 3 years ago

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

Actions #9

Updated by Xavier Perseguers over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF