-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
!!! TASK: 9.0 Set nodeName
to null for regular created nodes
#3515
Conversation
Well this is not totally correct as a tethered |
Tethered nodes always have node names (see NodeCreation::createTetheredWithNode), so if a node does not it is guaranteed to not be tethered. The difference is that the classification is projection state, e.g. if the node type configuration changed in the meantime, this information might be outdated, while asking the NodeTypeManager will be always in sync with the configuration - while not necessarily reflecting the content graph state. That said I'd go with the classification as this is more consistent with the rest I suppose |
As for the NodeInfoHelper: I think we should remove or at least deprecate the |
Yeah its used once in the helper itself internal (to provide the info for the neos ui) the other usage is:
|
…cation === Classification::CLASSIFICATION_TETHERED`
4a22948
to
c85c241
Compare
nodeName == null
and set nodeName
to null for non auto created node's
With this change applied, many more occurrences of |
Yes I thought that was the plan as discussed in the weeklies? but we can discuss this of course again … @skurfuerst what do you say? |
IIRC we agreed that both are deprecated and that My point was just to make aware that this change will increase the chances of exceptions at rendering time. Personally I'm fine with that because I try to avoid node paths already |
Hmm. Legacy projects can be migrated and the path logic would still work for existing nodes because they have names of course. For newly created nodes the use of nodepath would partially break your website. But the adjustment here of the developer to migrate away from nodenames is critical as otherwise nodes created via a custom import won’t work in this universe and everyone would be forced again to fill the node name with random stuff. -> this is not what we want as otherwise we wouldn’t need to make the nodename nullable. (Especially true for open source packages using nodepath) Additionally the nodepath was deprecated for ages (since neos 4 or 5?) and I think even announced at the con? Another point is that the now removed todo in line 100 says that our current nodename generation logic is not safe. We would need to look in all dimensions and check if the nodename is already occupied. And I rather not have this logic in place. I can imagine two things: Don’t generate nodeNames from the ui(this pr) or allow a flag to opt in the old behaviour-> it’s important to be opt in so the ecosystem will adjust to empty node names (or they could do it via aop) |
Good point! |
an hack for everyone to restore the old behavior - which is highly discouraged, would be to use aop (this might break at anytime):
|
Aaaand much scarier than But the same arguments apply here as above. The other choice would be that we have to guarantee for |
The fact that the with 4.3 introduced see pr neos/neos-development-collection#2430 In theory people might not really have noticed this of course, and i assume no one currently handles the null case for |
nodeName == null
and set nodeName
to null for non auto created node'snodeName
to null for regular created nodes
…420885` As with #3515 the `nodeName` will be null, so we dont need to use it for generating the uripath
WAIT BEFORE MERGE OF #3569 - as some tests would be cool ;)
resolves #3605
The ui currently tries to generate random (not particular "safe" as in unique) nodeNames. We dont need that anymore and it should go.
Also we currently dont account for
$node->nodeName
being null. And we should better check for the classification #3515 (comment)What I did
How I did it
How to verify it