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
BUG: NodeType
$fullConfiguration
is accessed when nodeType is not initialized.
#4333
Comments
mhsdesign
added a commit
to Flowpack/Flowpack.NodeTemplates
that referenced
this issue
Jun 14, 2023
This was referenced Jun 14, 2023
Merged
Sebobo
added a commit
to Flowpack/Flowpack.NodeTemplates
that referenced
this issue
Jun 19, 2023
* BUGFIX: NodeType is not initialized in super rare edge cases see neos/neos-development-collection#4333 * Update Classes/Domain/NodeCreation/PropertiesAndReferences.php --------- Co-authored-by: Sebastian Helzle <sebastian@helzle.it>
And helllo there Line 46 in 6e1f233
|
Great to finally have a bug report for this – we kept hacking around this issue, as you realized :) IMO we should just add the For 9.0 I still hope that we can turn the |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The NodeType (in 9.0) Has a TODO at the top
and that is pretty valid, as currently the nodeType is mutable and lazyloads its configuration.
This is problematic, in cases when we forget to call
$this->initialize()
before accessing$this->fullConfiguration
.I encountered this problem while testing, in my case
getPropertyType
didnt return the expected result.neos-development-collection/Neos.ContentRepository/Classes/Domain/Model/NodeType.php
Lines 436 to 442 in b217795
doesnt initialize the nodetype ... but other methods trigger this sideeffect correctly like
getProperties
neos-development-collection/Neos.ContentRepository/Classes/Domain/Model/NodeType.php
Lines 424 to 428 in b217795
A workaround is to call
getFullConfiguration()
beforegetPropertyType
to initialize.Other affected methods are fx.
getTypeOfAutoCreatedChildNode
Affected Versions:
7.3 ... 9.0
The text was updated successfully, but these errors were encountered: