- Issue created by @almunnings
- Merge request !58Issue #3410650 by almunnings: Support dynamic entity reference module → (Merged) created by almunnings
-
almunnings →
committed e8167e25 on 2.1.x
Issue #3410650 by almunnings: Support dynamic entity reference module
-
almunnings →
committed e8167e25 on 2.1.x
- Status changed to Fixed
12 months ago 6:30am 4 January 2024 - 🇧🇪Belgium JeroenT 🇧🇪
it seems that this issue reverted the changes that were made in 🐛 Paragraphs in preview mode not working Fixed .
- 🇦🇺Australia almunnings Melbourne, 🇦🇺
It kinda did and didn’t.
Moved away from buffering the entity references and restructured the resolvers.
Is it causing you issues?
- 🇧🇪Belgium JeroenT 🇧🇪
Yes, I was debugging an issue with @CedricL. While testing the graphql_compose_preview and same_page_preview we noticed that changes in paragraphs were no longer available in the grapqhl preview call.
Reverting this issue fixed the issue for us.
- 🇦🇺Australia almunnings Melbourne, 🇦🇺
Aighty I’ll take a look tonight.
Strange, the mechanism for the missing paragraphs was the unpublished entity filter, which is still there just moved.
I probably missed something. Bummer
- 🇦🇺Australia almunnings Melbourne, 🇦🇺
Before (if in preview) it would get the entity off the reference directly without access checking. The assumption being in preview, you made that content, so, uh, you should have access to whatever you put there.
Now the field_entity_reference producer now has access checking even if in preview.
$entities = $this->filterAccessible($entities, NULL, 'view', $context);
Paragraphs access load up the entity via
getParentEntity
, which in turn loads the non-preview entity out of storage, and checks if you have access to view it. Fantastic, until your user doesn't have access to the real entity, and is faking it til they make it via graphql_compose_preview and a token.So, the fix is actually in the graphql_compose_preview → module, with some static caching that should trickle down from the preview controller.
graphql_compose_preview_node_access() if interested.
Let me know how you go.
Cheers Automatically closed - issue fixed for 2 weeks with no activity.