Skip to content
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: Wrong workspace state after publishing #4783

Closed
1 task done
pKallert opened this issue Nov 29, 2023 · 5 comments
Closed
1 task done

BUG: Wrong workspace state after publishing #4783

pKallert opened this issue Nov 29, 2023 · 5 comments

Comments

@pKallert
Copy link
Contributor

pKallert commented Nov 29, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When a user has an outdated workspace and publishes their workspace to a shared workspace, the user's workspace status is automatically switched to 'up-to-date', even if it was 'outdated' before the switch.
With the way it currently is, the new 'rebase workspace button' and the normal 'publish to workspace' button have the same outcome, at least from the user's viewpoint.

Expected Behavior

I would expect the editor to not be able to update their workspace to 'up to date' just by publishing their changes. As far as I understood, a workspace should only be up to date after rebasing?
I am unsure if there is a nice solution here since requiring rebasing the workspace for every change an editor does in the shared workspace seems very annoying from the user's point of view.

Steps To Reproduce

  1. Create a new shared workspace named 'Testing'
  2. Log in using user 'User 1'
  3. Log in in different browser/incognito mode using user 'User 2'
  4. Switch to shared workspace Testing with both users
  5. Change a text element using User 1
  6. Publish changes to workspace 'Testing' using User 1 => Result: workspace of User 1 is 'up to date', workspace of User 2 is 'outdated'
  7. Change a text element using User 2
  8. Publish changes to workspace 'Testing' using User 2 => Result: workspace of User 2 is now changed from 'outdated' to 'up to date', workspace of user 1 is 'outdated'

Environment

- Flow: 9
- Neos: 9
- PHP: 8.2

Anything else?

In the projection the workspace status is just switched around, regardless of the current status:

private function whenWorkspaceWasPartiallyPublished(WorkspaceWasPartiallyPublished $event): void

see also discussion here: https://neos-project.slack.com/archives/C3MCBK6S2/p1700236382252689

I tested locally with #4692 and the problem still persists.

@mhsdesign
Copy link
Member

mhsdesign commented Feb 9, 2024

Related problem #4508

@bwaidelich
Copy link
Member

It would be really helpful to create Behat tests that reproduce the bug (in this case probably: it must not be possible to publish an outdated workspace)

@pKallert
Copy link
Contributor Author

I just retested with the latest version of master (beta11) and the issue still exists

@mhsdesign
Copy link
Member

I think as said by Bernard is that this is correct behaviour and possibly just slightly misleading on user land. Yes clicking sync before might not make a difference because a sync is done already.

Also we actually do an RebaseWorkspace beforehand always - which is not optimal as well - to ensure that a WorkspaceRebaseFailed exception is thrown that is handleable by the neos ui. The the implicit rebase in handlePublishIndividualNodesFromWorkspace etc would not throw this exception but should probably as well.

/**
* TODO: only rebase if necessary!
* Also, isn't this already included in @see WorkspaceCommandHandler::handlePublishIndividualNodesFromWorkspace ?
*/
$this->contentRepository->handle(
RebaseWorkspace::create(
$this->name
)
);

@mhsdesign
Copy link
Member

With the publishing v3 this is now definitely desired behaviour as discussed at the dresden sprint 24: #5301

Publish will do a rebase and if that works all desired changes are live and your workspace is up to date.
Other workspaces are then outdated.

@github-project-automation github-project-automation bot moved this from Prioritized 🔥 to Done ✅ in Neos 9.0 Release Board Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants