Sebobo / Shel.Neos.WorkspaceModule

A workspace module alternative for Neos CMS
MIT License
17 stars 5 forks source link

Bug: Child workspace can be set as base workspace #22

Closed pKallert closed 1 year ago

pKallert commented 1 year ago

Description

The module allows for the child workspace to be set as the base workspace of the base workspace

Steps to Reproduce

  1. Create a new workspace "Parent workspace" with base workspace "Live"

  2. Create a new workspace "Child workspace" with base workspace "Parent workspace" Bildschirmfoto 2023-01-04 um 15 08 57

  3. Edit "Parent workspace" and change the base workspace to "Child workspace" Bildschirmfoto 2023-01-04 um 15 10 18

  4. Click "Save changes"

Expected behavior

It should not be possible to select the "Child workspace" as the base workspace of the "Parent workspace"

Actual behavior

If you save the workspace, both workspaces disappear from the list. Users who have their personal workspaces based on one of the workspaces get a 500 error when going to the content page.

Sebobo commented 1 year ago

Thx for the report. Interesting, this is also possible in the default workspace module and therefore also a core bug.

So the UI here has to be fixed to validate this case and we need a validation. I tried saving and both workspaces disappeared after an error.

Can you also open an issue for the Neos core? We can fix it here and then create a fix for the core based on that.

Sebobo commented 1 year ago

Now validating in PHP and prevent the selection in the UI.