Inspired by the this arcticle, I've created a setting page.
At first it worked perfectly but I noticed that at some point in time, the contentrepository return is null when I tryed to retreive the page:
public ActionResult GetSettings(DealerLocationRequestParameter parameter)
var settings = _contentRepository.GetChildren(ContentReference.RootPage).FirstOrDefault();
If I switch my web browser in private mode (or clean the web browser cache manually), it works again.
How can I fix it ? What is in cache that created this issue ?
Hmm, If it works when opening up a new browser or clears the browser then it is not that call to content repository that returns null but rather some client side caching that gets stale. You could verify that by having a breakpoint in the above code.
That's it how I figured it out. The variable "settings" above, is null if I don't clear the cache.
HI - I am having the same issue. Can you please advise?
Make sure you have created the settings page in every language you are using. Easy to forget. Alternatively, change the above code to always get settings page in master language.