Skip to content

BUGFIX: Proper error if site node not found in backend #3954

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 9.0
Choose a base branch
from

Conversation

mhsdesign
Copy link
Member

It seems the (internal) contract for providing the UI state requires no site or document node, but this is not true (obviously)
The defaultNodesForBackend helper will just crash:

defaultNodesForBackend(): Argument #1 ($site) must be of type Neos\ContentRepository\Core\Projection\ContentGraph\Node, null given

It is invoked here via YAML - hence we did not detect this null pointer bug:

byContextPath: '${Neos.Ui.NodeInfo.defaultNodesForBackend(site, documentNode, request)}'

Instead now a pretty error is throw which will also highlight probably its cause:

Site node "neosdemo" not found in content repository "default" in dimension space point {"language":"en_US","targetGroup":"private"} and visibility constraints "removed"

In my case i had a configuration laying around adding a new dimension targetGroup for all sites which was un nice which lead to no nodes being found.

mhsdesign added 2 commits May 17, 2025 11:32
instead of

defaultNodesForBackend(): Argument #1 ($site) must be of type Neos\ContentRepository\Core\Projection\ContentGraph\Node, null given
@github-actions github-actions bot added Bug Label to mark the change as bugfix 9.0 labels May 17, 2025
@mhsdesign mhsdesign requested review from Sebobo and dlubitz May 17, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9.0 Bug Label to mark the change as bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant