This is an old post but I just ran into this error and found a solution I'd like to share.
A colleague found that when upgrading from v11 to v12, PropertyLists were crashing with little to no error messages. The solution was to convert all instances of [PropertyDefinitionTypePlugIn] to include a GUID before converting the database. The GUID should then be added to the v11 database.
I saw this error and noticed in the debug console a line that read:
"Unable to create a PropertyData instance of Type: 'MyProject.Data.Models.PoC.KeyValueItemProperty' Assembly: 'MyProject.Data'. Will fallback using the data type instead."
That KeyValueItemProperty was one of the PropertyLists that we added a GUID to, so I looked in the database.
SELECT *
FROM [MyDatabase].[dbo].[tblPropertyDefinitionType]
WHERE Name like '%KeyValueItemProperty%'
Sure enough, there were two entries for that Property Definition Type:
pkID Property Name GUID TypeName AssemblyName fkContentTypeGUID DisplayName GroupName Hidden
1000 13 KeyValueItemProperty NULL MyProject.Data.Models.Properties.KeyValueItemProperty MyProject.Data NULL NULL NULL 0
1223 13 KeyValueItemProperty E05C9EF6-E538-489E-AAF4-206EB431E41B MyProject.Data.Models.Properties.KeyValueItemProperty MyProject.Data NULL NULL NULL 0
I deleted the entry without the GUID with this command:
DELETE FROM [MyDatabase].[dbo].[tblPropertyDefinitionType]
WHERE pkID = 1000
Then I updated the tblPropertyDefinition that referenced the Property Definition Type to point to the ID that had the GUID (I guess a better solution would have been to update the previous entry with the GUID and delete the second entry.).
UPDATE [MyDatabase].[dbo].[tblPropertyDefinition]
SET fkPropertyDefinitionTypeID = 1223
WHERE fkPropertyDefinitionTypeID = 1000
After doing that, the site loaded just fine. (In full disclosure there was a second property list that had the same problem but the solution was the same.)
I highly suggest you check for all instances where the property definition type was duplicated, one with and one without the GUID, with this command. There may be property lists that don't have associated content, and that could cause a problem in the future.
SELECT *
FROM [MyDatabase].[dbo].[tblPropertyDefinitionType]
WHERE Name IN (
SELECT Name
FROM [MyDatabase].[dbo].[tblPropertyDefinitionType]
GROUP BY Name
HAVING COUNT(Name) > 1)
Anyway, this is what solved the issue for us. I hope this works for you, and if so please mark this accepted for future visitors with this error.
Note: I'm on EPiServer.CMS 12.27.1
Hi
That's a bit different case but good to know about it.
@devs can we please make some actual error message so we don't have to do 2 week investigation when this happens?
Let's face it, if your crash report doesn't contain ID of entry that crashed it can aswell be "oopsie, something goes wrong".
I'm having an error running some epi pages.
Adding "stringDelayedLoadThreshold" to appsettings.json doesn't seem to help.
Page Does have properties with hints on "longstring", TextArea and has properties of type IList<ContentReference>.
Exception:
InvalidOperationException: Lazy loaded property value is not supported by the current property instance
Stack trace:
This is quite frustrating as i don't even know which property is causing issues because i cannot load the model and exception message was written by an angry girlfriend, so i have no idea what is wrong.