SXA content disappeared after inserting a link
Recently, I’m having an issue with SXA as summarized below. It took me quite a while for investigating and thanks to Sitecore support, it has been resolved. Therefore, I think it’s better to share it, as others may have the same issue.
Apparently it’s a bug and to track the future status of the bug report, you can use the reference number 95437.
Here is the issue:
If the link field is used to wrap other fields as an example below, after user insert an link the image will disappear.
@Html.Sitecore().BeginField("Link")
@Html.Sitecore().Field("Header Image")
@Html.Sitecore().EndField()
In order to get ride of the issue, you can render links with child images like:
@Html.Sitecore().BeginField("Link",new {haschildren=true})
@Html.Sitecore().Field("Header Image")
@Html.Sitecore().EndField()