We are having the same exception shoving up from time-to-time. At the moment we have not found any good way of solving it without restarting the website, which is not really a solution.
There is some code in EPiServer.Global.cs that tries to clear the page cache when this error occurs, which makes me believe that it has to do with the cache getting out of sync.
InconsistentDataException inconsistentDataException = lastError.InnerException as InconsistentDataException;
if (inconsistentDataException != null)
CacheManager.Remove("EPPageData:" + new PageReference(inconsistentDataException.PageLink.ID, Settings.Instance.Parent.SiteId).ToString());
+1 on this problem.
The cause is that a loaded/cached instance is lazy loading a string, but that string is no longer available because the content has been republished. The code referenced above by Niklas is supposed to recover from this error for the next request/api call but it's not working, we are fixing this bug in Patch 5. Lazy loading is always tricky, so we are looking into alternative ways of solving this so the exception does not happens in the first place. You can always disable delayed loading of long strings by setting stringDelayedLoadThreshold="0" in siteSettings in episerver.config.
stringDelayedLoadThreshold="0" is the way we have solved it.
Yes, stringDelayedLoadThreshold="0" works for us as well.
Quick question, we are using EPiServer 7.1 for a solution and are also experiencing this problem. If possible, we would like to solve it without having to set the stringDelayedLoadThreshold="0" setting so that we can take advantage of the Lazy loading feature.
Had this bug been fixed?
It's fixed in Patch 5 to be released early this year, you can get the latest preview build of Patch 5 if you contact support. It's also been fixed in CMS 7.5.
Thanks for your prompt reply.
We are getting this problem after updating a test environment to the latest version of the code. It was quite a big update and there were a whole bunch of pages that lost data. It could be recovered by going to the previous version of the page. The issue is that it keeps happening. A user creates a page, goes away from the computer, comes back - makes changes, publishes and it publishes an older copy of the page instead of the latest one. It seems these symptoms match the description of the mismatch in cache states. We will try the stringDelayedLoadThreshold=0 and see if the problem goes away - I wonder when patch 5 will be available to download. I only find up to patch 4 so I will contact support as Per said.
We are still experiencing the same issue despite using stringDelayedLoadThreshold="0". It seems to be happening less but I have patch 5 so i will try that next.
I just got this error and is about to try and figure out why. First stop is of course asking here if anyone else has seen it and know how to get the page back in a working condition?
The stack trace before our code is: