Bug #92489

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

Added by Xavier Perseguers 10 months ago. Updated 8 months 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

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

Actions
#1

Updated by Gerrit Code Review 10 months 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

#2

Updated by Gerrit Code Review 10 months 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

#3

Updated by Gerrit Code Review 10 months 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

#4

Updated by Gerrit Code Review 10 months 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

#5

Updated by Gerrit Code Review 10 months 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

#6

Updated by Gerrit Code Review 10 months 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

#7

Updated by Markus Klein 10 months ago

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

Updated by Gerrit Code Review 10 months 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

#9

Updated by Xavier Perseguers 10 months ago

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

Updated by Benni Mack 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF