- Issue created by @Charlie ChX Negyesi
- Status changed to Fixed
about 1 month ago 11:11pm 19 November 2024 -
djdevin β
committed 96496b0d on 1.0.x authored by
ghost of drupal past β
Issue #3473358: Some cleanup and D10 compatibility
-
djdevin β
committed 96496b0d on 1.0.x authored by
ghost of drupal past β
- πΊπΈUnited States djdevin Philadelphia
That approach seems to conflict with jsonapi_cross_bundles but I don't know why
The website encountered an unexpected error. Try again later. Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "workspaces_parallel.entity_repository", path: "redirect.request_subscriber -> redirect.checker -> access_manager -> paramconverter_manager -> paramconverter.jsonapi.entity_uuid -> workspaces_parallel.entity_repository -> jsonapi.exception_subscriber -> jsonapi.serializer -> serializer.normalizer.resource_identifier.jsonapi_extras -> Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface -> jsonapi_cross_bundles.cross_bundle_resource_type_repository.inner". in Drupal\Component\DependencyInjection\Container->get() (line 149 of core/lib/Drupal/Component/DependencyInjection/Container.php).
- d49052d1 committed on 1.0.x
Revert "Issue #3473358: Some cleanup and D10 compatibility" This...
- d49052d1 committed on 1.0.x
- πΊπΈUnited States djdevin Philadelphia
Spoke too soon, this prevents the entity repository from getting swapped out so the loaded revisions are wrong.
- π¨π¦Canada Charlie ChX Negyesi πCanada
Sorry, I am not quite sure what you mean. The patch changes from extension to decorator yes but how does this break things...?
- πΊπΈUnited States djdevin Philadelphia
Basically just follow the steps in https://www.drupal.org/project/drupal/issues/3438083#comment-15866369 β¨ Ability to edit content in live workspace when it has been edited in other workspaces Active
It looks like it should work, but it fails with this patch. I keep getting the latest revision instead of the latest non-workspace revision.
- πΊπΈUnited States djdevin Philadelphia
If you run this in devel/php it illustrates the problem (clean D10 site)
$node = \Drupal::entityTypeManager()->getStorage('node')->create([ 'title' => 'Change in the live site', 'type' => 'page', ]); $node->save(); $stage_ws = \Drupal::entityTypeManager()->getStorage('workspace')->load('stage'); $ws_manager = \Drupal::service('workspaces.manager'); $ws_manager->setActiveWorkspace($stage_ws); $node->title = 'Change in stage site'; $node->save(); $ws_manager->switchToLive(); $nE = \Drupal::entityTypeManager()->getStorage('node')->load($node->id()); $nR = \Drupal::service('entity.repository')->getActive('node', $node->id()); // These outputs should be the same because we are in the live workspace so we should only see the non-workspace change. echo $nE->label(); echo "\n"; echo $nR->label();
- πΊπΈUnited States djdevin Philadelphia
djdevin β changed the visibility of the branch 3473358-some-cleanup-and to hidden.
- Merge request !5Reapply "Issue #3473358: Some cleanup and D10 compatibility" β (Open) created by djdevin