-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
BUGFIX: Implement document uri path placeholders #5078
Conversation
Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjection.php
Show resolved
Hide resolved
Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjection.php
Show resolved
Hide resolved
…ojection.php Co-authored-by: Bastian Waidelich <[email protected]>
Clever solution, +1 by reading. One thing I wonder: IIRC we plan to store the expanded super node type names with the creation event. That might make parts of this redundant!? |
…ojection.php Co-authored-by: Bastian Waidelich <[email protected]>
It will prevent future events from having classification unknown, yes. But sadly we cannot safely apply the SuperNodeTypes to past events because we don't know the past state anymore, so we still need to handle that case |
i would like to think further into that direction if its really not possible as this will prevent us from this complexity. But for that i have think a little more :D |
Proof that this cannot work:
Now try to assign supertypes to event 1 |
Also yet tbd: what to do if something is a site AND a shortcut |
Neos.Neos/Classes/FrontendRouting/Projection/DocumentTypeClassification.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nezaniel,
I was able to verify that your change resolves #5077.
I have one (unfortunately non-trivial) note on the code (see comments below), other than that: 👍
Regarding that note: I'm hesitant to select "Request Changes" here, because my suggestion is in a gray area between nice-to-have and probably-better-for-long-term-comprehensibility, and will require quite some work. I can't judge how relevant that is in the context of this particular projection. So, I'd be fine if you 👎 me on this one. I'll approve regardless of my suggestion in that case.
Neos.Neos/Classes/FrontendRouting/Projection/DocumentTypeClassification.php
Outdated
Show resolved
Hide resolved
Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjection.php
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nezaniel and I talked about my comments above and concluded that these are possible improvements that can be taken on at a later point, and should be postponed to enable a swift beta11 release.
To ensure that the current state is not exposed as API anywhere, @nezaniel has now marked DocumentTypeClassification
as @internal
.
resolves #5077
This introduces the concept of placeholders for document uri paths. If the DocumentUriPathProjection encounters an unknown node type - which may happen during replay - it creates a placeholder instead of ignoring it. Placeholders are not evaluated in routing, but are transformed to actual uri paths once the respective node aggregate has been changed to type document, shortcut or site.
Upgrade instructions
needs both cr:setup and cr:projectionreplay documenturipath
Review instructions
We still need to decide on how to deal with the node type changes
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions