How to fix the property lazy loading error in Optimizely
While doing some refactoring of namespaces in my project the server error below popped up. I could not find a clear answer on how to resolve this issue except for that it was related to a custom PropertyList property.
Lazy loaded property value is not supported by the current property instance Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Lazy loaded property value is not supported by the current property instance
After doing some digging I realized that a second property type definition had been created because I updated the namespace of my custom PropertyList property. The 'Edit Custom Property Types' view in the CMS shows all the property definitions and can be used to update and delete these in the database.
The solution to this issue is to delete the duplicate property definition and make sure to update the definition to use the new namespace.