Needs review
Project:
Multiversion
Version:
8.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2019 at 17:31 UTC
Updated:
17 Aug 2021 at 08:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
edward.radau commentedI'm running into this as well. Do you use the multiversion module? I believe this is a bug with that module, not Workspace. multiversion module also implements a Workspace Entity which extends an WorkspaceInterface also provided by the multiversion module and there appears to be a conflict with the namespaces as far as I can tell.
Comment #3
agentrickardYes, it would be perfectly fine to move this issue to that module's queue.
Comment #4
agentrickardMoving to the proper queue.
Comment #5
agentrickardHere is a _very naive_ and untested patch that merely tries to replace the existing class definition of the Workspace entity with that from core.
I am pretty convinces that if this type of approach fails, the only answer will be an upgrade / migration path.
Comment #6
agentrickardComment #7
mattltHello,
Patch isn't working for me. It's throwing a different error now…
Thanks,
•• matt
Comment #8
agentrickardRight. It's simply not going to work. The two classes are far too different.
Comment #9
matroskeenI have some general questions to project maintainers:
Comment #10
matroskeen@jegg responded in Slack:
Thanks!
Comment #11
matroskeenHi again,
My notes after some investigation:
Drupal\workspaces\WorkspaceInterfacerequired bycontent_moderation_workspace_access()because this interface is provided by core Workspaces module (it'll require us to install Workspaces module);content_moderation_workspace_access()provides access checking when we publish the whole workspace and especially looking at "publish" action. We don't have this operation in Multiversion/Deploy implementation, so I think we can just apply a workaround and do not call this implementation;Comment #12
agentrickardThis seems like it would work.
I was going to propose a core patch that removes the type hint on content_moderation_workspace_access() as a temporary measure until we fix the upgrade path, but I think this is faster.
I can test this today.
Comment #13
agentrickardThis patch appears to be working in a test of default core (not on a real site).
Not sure what the test fails are about.
Comment #14
matroskeenTests fail because of #3090566: Make Multiversion compatible with the latest changes related to url aliases in Drupal 8.8.x.
Comment #15
agentrickardAh, so that patch has to go in first.
Comment #16
mohangathala commentedsolution provided here : https://www.drupal.org/project/drupal/issues/3145352 and it works for me.