- Issue created by @cosmicdreams
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
Update here, I'm finding the that clearing of the plugin cache is not a permanent solution. The issue recurs when you make another edit.
I'm starting to thing that the proper path to a solution here is to extend the menu_link_content entity to explicity declare that it has workspace support instead of indirectly compute it's workspace support as a result of the revision support that it has.
adding a line to the entity metadata makes this clear:
handlers = { * "storage" = "\Drupal\menu_link_content\MenuLinkContentStorage", * "storage_schema" = "Drupal\menu_link_content\MenuLinkContentStorageSchema", * "access" = "Drupal\menu_link_content\MenuLinkContentAccessControlHandler", * "form" = { * "default" = "Drupal\menu_link_content\Form\MenuLinkContentForm", * "delete" = "Drupal\menu_link_content\Form\MenuLinkContentDeleteForm" * }, * "list_builder" = "Drupal\menu_link_content\MenuLinkListBuilder", * "workspace" = "Drupal\workspaces\Entity\Handler\DefaultWorkspaceHandler" * },
- π·π΄Romania amateescu
Found the problem, when we introduced workspace handlers in π Add mechanism to have workspaces skip processing entity types Fixed we forgot that we should also set them on the last installed entity type definitions.
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
I'll be able to test this patch tonight.
- π·π΄Romania amateescu
I think this needs an upgrade path as well, so the only useful testing atm is on a site where Workspaces hasn't been installed yet. Or at least uninstalled and then installed again :)
- πΊπΈUnited States smustgrave
Thanks for always including test coverage, makes issues go by so much easier!
I re-ran the failures
Time: 00:12.169, Memory: 10.00 MB Workspace Handler Update Path (Drupal\Tests\workspaces\Functional\Update\WorkspaceHandlerUpdatePath) β Run updates β β Failed asserting that null is identical to 'Drupal\workspaces\Entity\Handler\IgnoredWorkspaceHandler'. β β /builds/issue/drupal-3491193/core/modules/workspaces/tests/src/Functional/Update/WorkspaceHandlerUpdatePathTest.php:55 β΄
This keeps failing though.
- π·π΄Romania amateescu
That's a great failure, it shows that we're testing things properly. Fixed the update function.
- πΊπΈUnited States smustgrave
Thanks for the quick turnaround, changes look good to me.
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
Should this issue also be concerned with the MenuLinkContent entity. In general, do we introduce harm to the platform by declaring support for workspace within the Entity definition vs having the system determine an entity's support for workspaces through it's current logic?
- π·π΄Romania amateescu
@cosmicdreams, the MR is handling all workspace-supported entity types. But it would be great if you could test it on your site for an additional confirmation.
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
cool. That's on deck for today.
- π¬π§United Kingdom alexpott πͺπΊπ
I have a couple of concerns about the approach. We're moving code into the block_content module that depends on workspaces even though block_content does not depend on workspaces - are we sure this is the correct thing to do?
- π·π΄Romania amateescu
This is no different than entity types specifying
\Drupal\views\EntityViewsData
as theirviews_data
handler, or even having entity type specific handlers (NodeViewsData extends EntityViewsData
), without depending on Views :)