- Issue created by @cedricl
- ๐ฆ๐บAustralia almunnings Melbourne, ๐ฆ๐บ
Oh,
Hmmm, quick look at it and it would be the difference between our `EntityPreviewBuffer` to get the node, and the `EntityRevisionBuffer` used by the GraphQL module `entity_reference_revisions` data producer, to get the related entities.This issue would have been introduced when we moved to a producer vs a looping entity loader via the $node->field_whater->entity. Mainly for cache and speed and less ownership over the code.
Issue would probably affect any unsaved entity reference in preview (eg via inline entity module)
Solution could probably get introduced in the gqlc `EntityReferenceRevisionsItem`
Maybe a new shimmed producer, or a switch into a another producer for previews, or do some dodgy old loading when in previews.I reckon we can fix it.
- ๐ง๐ชBelgium cedricl
This seems to be related.
https://www.drupal.org/project/decoupled_preview/issues/3398030 ๐ Issue With Paragraph Entity Active - Merge request !55Issue #3405909 by almunnings, CedricL: Paragraphs in preview mode not working โ (Merged) created by almunnings
- Status changed to Needs review
about 1 year ago 2:38am 16 December 2023 - ๐ฆ๐บAustralia almunnings Melbourne, ๐ฆ๐บ
Ok, lets give this a whirl.
In the route i'm setting a preview context
Then in the resolver I'm running a `cond` on that to use the property or the buffer.Let me know how you go.
- Status changed to RTBC
about 1 year ago 3:15pm 18 December 2023 - ๐ง๐ชBelgium cedricl
Code works as intented. Can be merged.
Thanks Almunnings!
-
almunnings โ
committed 1799e7a3 on 2.1.x
Issue #3405909 by almunnings, CedricL: Paragraphs in preview mode not...
-
almunnings โ
committed 1799e7a3 on 2.1.x
- Assigned to almunnings
- Status changed to Fixed
about 1 year ago 3:58am 22 December 2023 - ๐ฆ๐บAustralia almunnings Melbourne, ๐ฆ๐บ
Automatically closed - issue fixed for 2 weeks with no activity.
- ๐ง๐ชBelgium cedricl
It looks like the changes that happened in your merge request are removed from 2.1, in a later commit. I added a patch to re-include these changes, so the preview with paragraphs works again.
- ๐ฆ๐บAustralia almunnings Melbourne, ๐ฆ๐บ
Afternoon brodeo,
Perhaps I wasnโt super clear in the other ticket. My bad.I canโt reintroduce these changes, as they bypass access controls on referenced entities in preview mode.
The fix youโre looking for with anonymous/other user previews is in graphql_compose_preview dev module, which alters node access.
Unless youโre saying the previews donโt work for the same user?