0

I am using Sitecore 9.3 and I have a .cshtml updated but the update is not reflected on CD server although the physical file is updated.

I do iisreset and publish for the site to clear any cache but this didn't solve the issue as well.

Also, I tried to change the file name and change it in rendering but it didn't solve the issue also.

Any advise?

6
  • Can you please provide more info about the cshtml, whether you applied rendering cache etc and also make sure that the rendering has been published to the target database Feb 2 '20 at 9:38
  • The rendering is published and the cshtml is as below no caching is applied: <div class="col-12 p-0"> @if (Model.Item != null) { foreach (BaseVariantField variantField in Model.VariantFields) { @Html.RenderingVariants().RenderVariant(variantField, Model.Item, Model.RenderingWebEditingParams, Model) } } </div>
    – NAli
    Feb 2 '20 at 9:50
  • Have you applied sitecore cache such as vary by data etc on the rendering properties? Also make sure that the correct rendering and it’s associated cshtml has been configured on the item Feb 2 '20 at 9:54
  • No Caching is applied and the html is associated with the current rendering
    – NAli
    Feb 2 '20 at 14:20
  • Did you check the actual location where the cshtml is placed, Sometimes the latest file gets copied to wrong location in case of manual deployment
    – Abhay Dhar
    Feb 3 '20 at 7:06
4

There may be many reasons.

  1. If you have multiple CD servers and .cshtml file deployed only one server correctly.
  2. File location is not correct, you can cross check if file location is correct by navigating rendering path in sitecore tree.
  3. Remove caching on rendering level.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.