November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Probably a de javu, but can you post the code for LinkABC?
Does the stacktrace point to same property all the times, or is it different every time?
Hi Quan
It's a simple string property. It's always the same property (ie, the new one) so if I try to change property name or type it breaks.
[Display(
Name = "Länk",
Description = "",
GroupName = SystemTabNames.Content,
Order = 10)]
public virtual string LinkABC { get; set; }
I'm out of idea. You are very welcome to get in touch with developer support service, so they can have a copy of your site and reproduce the issue. I'd be happy to take a look when that is in our hands
I've just upgraded to CMS 12.22.6 and now the call to "/EPiServer/cms/Stores/contentdata/[ID]" returns 200 with an json-object but the new properties aren't found in the json response.
I wonder, can you disable/enable automatic creation of code first properties? If something went wrong with the db-upgrade and that setting is turned off somehow?
Hi Marks.
Thanks for the link. I have to test out "Episerver Developer Tools" and see if I can sort out what's wrong.
I noticed that I can create new content types and add/remove properties without a problem, so it must be something weird with the ones that has been migrated.
So I've been playing around with ContentTypeModelRepository and I can see that my property is actually added to the page types PropertyDefinitionsModels but it's missing ExistingPropertyDefinitions (compared to a XhtmlString-property that was there before the upgrade).
The "BlaBla"-property is a simple int property:
[Display(Order = -1)]
public virtual int BlaBla { get; set; }
I tried to set a value programatically and got this error as well.
So if anyone have any clue I'm open for suggestions :)
I saw in the logs that I have a bunch of these warnings:
EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister: Warning: Changes in the model were ignored because its version(0.0.0.0) is lower than version in the database(1.0).
I Googled it and stumbled upon this thread: https://world.optimizely.com/forum/developer-forum/cms-12/thread-container/2022/12/initialization-fails-after-upgrad-to-cms-12/
But I tried to add this setting to match with the db version but nothing happens.
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>1.0</Version>
<AssemblyVersion>1.0</AssemblyVersion>
<FileVersion>1.0</FileVersion>
</PropertyGroup>
I also updated the Version-column in tblContentType to match the db version but still the same error. But I think I'm onto something here. Is there something I'm missing?
I does not I'm afraid. I've changed Version in tblContentType to 2.0.0.0 and AssemblyVersion to 2.0.0.0 but the error is still
Changes in the model were ignored because its version(0.0.0.0) is lower than version in the database(1.0).
So i don't know where it gets 0.0.0.0 from.
If you look into tblContentType, ModelType column, it should be something like this
Foundation.Features.Locations.Blocks.FilterActivitiesBlock, Foundation, Version=2021.4.1.0, Culture=neutral, PublicKeyToken=null
you can probably change it to see if has any effect
Hmm, I tried to change it to 2.0.0.0 and got this error:
EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister: Warning: Changes in the model were ignored because its version(0.0.0.0) is lower than version in the database(2.0).
So I tried to change it to 0.0.0.0 and now it works!
So for anyone who has the same problem. My problem was that that in tblContentType my custom content types had this version
Client.Web.Models.Pages.LandingPage, Energiforetagen.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
But changing it to
Client.Web.Models.Pages.LandingPage, Energiforetagen.Web, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
solved the problem.
Removing <AssemblyVersion> and <FileVersion> (if they exist) from csproj and adding <GenerateAssemblyInfo>true</GenerateAssemblyInfo> solved my problem.
We've just released an upgraded CMS 12 site and started working with new features but now I realize that we cannot create new properties (code first) because "/EPiServer/cms/Stores/contentdata/16194_98172" crashes (stack trace added bellow).
I've removed everything non-vital from startup.cs just to make sure that there's no interferrence with other plugins but the problem still persist.
However, if I also add this property on the page type via admin mode the property is added correctly and it's marked as from code: "yes"