You get that error when there is some entry in tblContentProperty.LongString ot tblWorkContentProperty.LongString that has a value which length is over the value defined in config by <applicationSettings stringDelayedLoadThreshold="<value here>" /> (the default value for threshold is 255) and where the corresponding PropertyData class does not support delayed loading (does not implement ILazyProperty).
Do you have any custom property with PropertyDataType.LongString that does not implement ILazyProperty?
We ran into this issue when one of the developers on a separate branch checked in code declaring a Property List and set values on certain pages.
Aniket
Hi Johan!
As far as I can see in our code base, we dont have any custom properties that builds upon "LongString". However, when I added the setting with a higher value, suddenly the site started working. I guess it may come with a performance penalty to have a high value (?) but as it solved the issue I will mark your answer as the corrent one :)
When looking to the code I see that class PropertyList does not implement ILazyProperty but PropertyList<T> does. So in case you have a property inheriting PropertyList you could consider inheriting PropertyList<T> instead.
We have used the PropertyList as follows:
public class PropertyListBase<T> : PropertyList<T> { private Injected<ObjectSerializerFactory> _objectSerializerFactory; private IObjectSerializer _objectSerializer; public PropertyListBase() { _objectSerializer = _objectSerializerFactory.Service.GetSerializer("application/json"); } protected override T ParseItem(string value) { return _objectSerializer.Deserialize<T>(value); } }
And we use this class like this:
[PropertyDefinitionTypePlugIn] public class EventDateList : PropertyListBase<EventDate> { }
It's quite funny that when I read Anikets post, a collegue of mine said "I hade an issue once when someone pushed some changes to a Property List to another branch" .. :D
That should be fine since PropertyList<T> do support lazy loading.
Could it be that it for some reason cant load your custom property and therefore fallback to default type for Json (I see that the default property type that is used when a custom json property cant be loaded does not support lazy loading). If you look in admin mode under 'Config/Edit Custom Property Types' and on the content types that uses the custom property, does any of them indicate that it cant load the custom property type?
Hi!
When working with a site that worked like a charm previously, I suddenly get very strange errors when trying to run the GetChildren method of the IContentLoader.
Partial Stacktrace:
The code that calls GetChildren() looks as follows:
Does anyone have got a clue to why this appears?
The only main difference from the time when it was working is that the database has been moved from the cloud to a local SQLEXPRESS instance.
Best regards
William Hemmingsson