Skip to content
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

Better Errors: Call to a member function getContext() on null #3182

Closed
mhsdesign opened this issue Sep 2, 2022 · 0 comments
Closed

Better Errors: Call to a member function getContext() on null #3182

mhsdesign opened this issue Sep 2, 2022 · 0 comments
Labels
7.3 8.3 Accessibility Bug Label to mark the change as bugfix DX This issue, once solved, might improve the Developer Experience for Neos Integrators.

Comments

@mhsdesign
Copy link
Member

Description

Steps to Reproduce

  1. you have no site, fx. after `flow site:prune '*'" or before importing a site
  2. you open the backend by typing /neos

Expected behavior

Somebody tells you that there is not much to manage in neos but the backend works (the other modules), or you get a exception which states exacly on first glance what is actually wrong.

Actual behavior

You get a "nice" error:

image

Call to a member function getContext() on null

[What actually happened]

The BackendController calls at some point inside findNodeToEdit $siteNode->getContext() ... on null. $siteNode was retrieved by the internal method getSiteNodeForLoggedInUser which cant (for apparent reasons) find out the site node.
This results in a rather harsh error and should be avoided to calm the user ;)

Affected Versions

Neos.UI:
since at least 7.3 but sure before ... tested with 8.0

@grebaldi grebaldi added Bug Label to mark the change as bugfix Accessibility DX This issue, once solved, might improve the Developer Experience for Neos Integrators. 7.3 8.3 labels May 1, 2023
jonnitto added a commit that referenced this issue Nov 4, 2023
…xtOnNull

BUGFIX: #3182 betterErrorForGetContextOnNull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.3 8.3 Accessibility Bug Label to mark the change as bugfix DX This issue, once solved, might improve the Developer Experience for Neos Integrators.
Development

No branches or pull requests

2 participants