If you have a bard field with a set that has an assets field, and that bard field is inside a replicator, the asset preview will render raw JSON instead of the image:
I tried to fix it, and traced the issue to the value instanceof PreviewHtml check in ManagesPreviewText.js. For some reason the object is ending up as a plain object not a PreviewHtml object, so the check fails. But I couldn't figure where that was happening.
This does not happen with replicators/bard fields at the top level.
Bug description
If you have a bard field with a set that has an assets field, and that bard field is inside a replicator, the asset preview will render raw JSON instead of the image:
I tried to fix it, and traced the issue to the
value instanceof PreviewHtml
check inManagesPreviewText.js
. For some reason the object is ending up as a plain object not aPreviewHtml
object, so the check fails. But I couldn't figure where that was happening.This does not happen with replicators/bard fields at the top level.
How to reproduce
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response