neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 221 forks source link

BUG: Misconfiguration of NodeType leads to undiscardable changes and closed content-stream #4983

Open c4ll-m3-j4ck opened 3 months ago

c4ll-m3-j4ck commented 3 months ago

Is there an existing issue for this?

Current Behavior

When a node is misconfigured, the user workspace can end up in a locked state when trying to discard or apply changes.

It seems like the order of operations (closing content-stream, forking content-stream, rebasing workspace) can lead to a situation where if the rebase fails, the previous content-stream is already locked. This makes it impossible to discard or apply changes and instead shows the error-message: Content stream "{content-stream-id}" is closed.

I was able to solve the issue by manually discarding the workspace via command.

The corresponding lines from the event-log:

187 ContentStream:b47fd2a8-21c8-464e-a788-227750a897c2  2   ContentStreamWasClosed  {"contentStreamId":"b47fd2a8-21c8-464e-a788-227750a897c2"}  {"initiatingUserId":"f9007041-2a1d-4476-b4c2-f0839676f740","initiatingTimestamp":"2024-04-08T10:54:35+00:00"}   a3c22eef-cb3a-438b-b02d-d5c24b2f49d1    NULL    NULL    2024-04-08 10:54:35
188 ContentStream:7a5b4364-821f-4a67-9df2-4eb2ae00a168  0   ContentStreamWasForked  {"newContentStreamId":"7a5b4364-821f-4a67-9df2-4eb2ae00a168","sourceContentStreamId":"0359b978-1f56-45b1-853e-078fa25c0a72","versionOfSourceContentStream":28}  {"initiatingUserId":"f9007041-2a1d-4476-b4c2-f0839676f740","initiatingTimestamp":"2024-04-08T10:54:36+00:00"}   61e74033-a423-4bde-9bf4-a79cdd5fa769    NULL    NULL    2024-04-08 10:54:36
189 Workspace:user-michel-loew  17  WorkspaceRebaseFailed   {"workspaceName":"user-michel-loew","candidateContentStreamId":"7a5b4364-821f-4a67-9df2-4eb2ae00a168","sourceContentStreamId":"b47fd2a8-21c8-464e-a788-227750a897c2","errors":[{"commandIndex":1,"message":"Error with command Neos\\ContentRepository\\Core\\Feature\\NodeCreation\\Command\\CreateNodeAggregateWithNodeAndSerializedProperties in sequence-number 186","cause":{"class":"Neos\\ContentRepository\\Core\\SharedModel\\Exception\\PropertyTypeIsInvalid","message":"Given property \"dummy\" is declared as undefined type \"expoStand\" in node type \"JvMTECH.Wemp.Expo:Document.Model.ExpoPackage\""}}]} {"initiatingUserId":"f9007041-2a1d-4476-b4c2-f0839676f740","initiatingTimestamp":"2024-04-08T10:54:37+00:00"}   702563d0-d720-465f-bf00-319b9849fb06    NULL    NULL    2024-04-08 10:54:37

I do have a full db-dump from the error-state but I don't necessarily want to share it here in its entirety. @kitsunet has access to the data at error-time.

Expected Behavior

The workspace should not lock up in an unrecoverable state.

Steps To Reproduce

No response

Environment

- Flow: 9.0.x-dev
- Neos: 9.0.x-dev
- PHP: 8.3

Anything else?

No response

bwaidelich commented 3 months ago

Thanks for reporting! This will hopefully be resolved with #4965 – I'm on it right now

bwaidelich commented 2 months ago

@c4ll-m3-j4ck could you check whether the issue was solved with https://github.com/neos/neos-development-collection/pull/4965 i.e. in beta9?