Reputation: 1173
Using Sitecore 8.0u3 and Glass-Mapper 3.5.3
I've run into an interesting situation that I can't resolve. I'm seeing on certain controller renderings that some values for simple text fields(single-line, multiline) appear to be cached. Other controller renderings do not appear to have this issue.
I attempt to write out the intro text for the form like so:
<div class="intro">@Editable(m => Model.ContextItem.Intro_Text)</div>
<div>RAW: @Model.ContextItem.Intro_Text</div>
Note that the second line was added by me for troubleshooting purposes.
In this case, the result of this is:
Fill out the form to contact uss.
RAW: Fill out the form to contact uss.
I update the text in Sitecore to remove the extra 's', save and publish. I refresh my page and I see this:
Fill out the form to contact uss.
RAW: Fill out the form to contact us.
So the portion that does not use Editable
works fine, but the Editable
version continues to show the 'old' value.
I've looked at a lot of settings including the cacheability of the rendering, the cacheability of the site, the Caching.Enabled
setting, the Caching.HTMLLifetime
setting, IIS caching, publishing restrictions, but none seem to affect this issue.
Any ideas of other places to look for the source of the issue?
Upvotes: 1
Views: 1295
Reputation: 445
The @Editable() looks at the HtmlString and most probably displays it from the HtmlCache. I have seen this issue as well and during build process and I have to do re-publish all to clear caches, specially when I will be making data template changes.
You can try few things in your development environment and narrow down the issue.
Once you make a change, clear HTML cache from /sitecore/admin/cache.aspx and check the page again.
Try doing an incremental publish to the site as it will clear HTML cache.
Try doing a republishing the site.
Also, disable the output cache for the website under
Upvotes: 0
Reputation: 471
I cam across this issue a while ago. Change the syntax to be @Editable(Model => Model.ContextItem.Intro_Text)
Upvotes: 1
Reputation: 2077
I think you need to use the syntax <div class="intro">@Editable(m => m.ContextItem.Intro_Text)</div>
rather than <div class="intro">@Editable(m => Model.ContextItem.Intro_Text)</div>
Upvotes: 7