cms
cms copied to clipboard
Bard inside replicator HTML set previews render raw JSON
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 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.
How to reproduce
- Create a replicator
- Add a set
- Create a bard field in that set
- Add a set
- Add an assets field
- Set an asset
- Collapse the set
Logs
No response
Environment
Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.6.2
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
Having the same problem. would be nice to have this fixed :)