Preview not displaying image content assets from the Content Hub
Hi there
Our CMS environment isn't displaying images in the page builder or preview mode. However if I right click on the asset in the browser inspector and open in new tab then then image displays. There is an error in the log displaying "Relative path hash validation has failed". I have made sure the CMSHashStringSalt matches that of the Project info in the SaaS portal dashboard and I have even tried re-signing the macros. I've not worked much with the SaaS environment before so not sure if there is something I have missed with regards to that which might account for the issue.
Environment
Xperience by Kentico version: [30.5.1]
.NET version: [9]
Execution environment: [SaaS]
Answers
- Does this happen in all environments?
- How are you generating URLs for images rendered in your website channels?
- If this is a production environment issue, are you using a custom domain?
- If you go to the Xperience Portal dashboard and click the "show" button in the Project info panel you can see the hash string salt used for the project. You should be using that locally.
- Are you deploying website pages and content items through CD deployment packages or authoring them in your SaaS environments?
Hi Sean, let me address those questions...
- Yes this occurs on all environments, locally, QA, UAT, PROD
- We are simply obtaining the Url of the asset retrieved similar to...
https://docs.kentico.com/developers-and-admins/development/content-retrieval/retrieve-content-items#retrieve-assets - Its across all environments
- Yeah, that is where I obtained the hash string salt value I am using
- We're not deploying the website and content item through CD deployment. We are authoring them on each respective environment
Thanks Sean - I have sorted. Appears the tilde in the path was causing the issue but only for the preview.
I also have had HashValidation errors in the event log and it seems to be related to misformed/poorly formed image links
To answer this question, you have to login first.