Skip to content

Neos 9.0 Sub-request on Neos.Neos Frontend page broken #4909

@mhsdesign

Description

@mhsdesign

Routing in plugins like described here neos/Neos.Demo#190 (comment) is currently broken.

The EventSourcedFrontendNodeRoutePartHandler expects a NodeAdress instance and not a serialized string:

Fix:

if (!$nodeAddress instanceof NodeAddress) {
    $nodeAddress = NodeAddressFactory::create($this->contentRepositoryRegistry->get($currentRequestSiteDetectionResult->contentRepositoryId))
        ->createFromUriString($nodeAddress);
}

But the real question is why was it a string in the first place? I fear because of this weird thing?

With this fix the Neos.Neos:Plugin works as described here neos/Neos.Demo#190

Things i tested in the controller (we should ad an behat test for each):

  • forward (content of other action)
  • throwStatus (500 will be upmerged and plugin will show text inside: 500 Internal Server Error
  • redirect (uri will change)
  • set arbitrary header x-mhs: foobar
  • build uri to another action (navigation)
  • render fluid view
  • render string

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done ✅

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions