Bug #46682

Redirecting to a Request pointing to a Neos node does not work

Added by Adrian Föder over 2 years ago. Updated 10 months ago.

Status:Closed Start date:2013-03-26
Priority:Should have Due date:
Assigned To:Christian Müller % Done:

0%

Category:-
Target version:Base Distribution - 1.0 beta 1

Description

in Neos' FrontendNodeRoutePartHandler's resolveValue(), the intended node is found out the following way:

    $contentContext = $this->nodeRepository->getContext();
    if ($contentContext->getWorkspace(FALSE) === NULL) {
        return FALSE;
    }
    $node = $contentContext->getCurrentSiteNode()->getNode($matches['NodePath']);

The node Repository's Context is more or less "side-effectly" set while the Router calls FrontendNodeRoutePartHandler's matchValue(), this again calls

$this->nodeService->getNodeByContextNodePath($requestPath);

followed by creating the live workspace.

However, when calling redirectToRequest(), it looks like the routing part is somewhat skipped (is that correct?), hence no such context is prepared.

Update

Probably the actual reason or issue is that building an URI leads to these problems if there is no such context available.

History

#1 Updated by Adrian Föder over 2 years ago

  • Subject changed from Redirecting to a Request with a cached route does not work to Redirecting to a Request pointing to a Neos node does not work

#2 Updated by Aske Ertmann over 2 years ago

  • Status changed from New to Accepted

I agree that the content context could probably be set in a way with fewer side effects, but I don't have any plan on how to do so at the moment. Just to clear up, this problem occurs when trying to create links from plugin or module when the content context hasn't been set on the node repository, IIRC.

#3 Updated by Christian Müller over 2 years ago

  • Assigned To set to Christian Müller

That is probably the same bug that Robert had. I knew this would come back at some point. We need a reliable way to make sure we set a context.

#4 Updated by Adrian Föder about 2 years ago

could have been resolved with https://review.typo3.org/#/c/21250/

#5 Updated by Aske Ertmann about 2 years ago

  • Target version set to 1.0 beta 1

#6 Updated by Jonas Renggli 10 months ago

  • Status changed from Accepted to Closed

Changes have been merged.
This should be fixed since Neos 1.0.0 and 1.1.0

Also available in: Atom PDF