November Happy Hour will be moved to Thursday December 5th.

Can't write text in my Factblock

Vote:
 

Hi.


I am trying add text to my Factblock, but get this error instantly after typing the text:


I tried adding [UIHint("StringsCollection")] to the IList<string> property, but im still getting the error.

public class FactBlock : BlockData
{
[Display(Name = "Tittel", GroupName = SystemTabNames.Content, Order = 1)]
public virtual string Title { get; set; }

[UIHint("StringsCollection")]
[Display(Name = "Fakta", GroupName = SystemTabNames.Content, Order = 2)]
public virtual IList<string> ListOfStrings { get; set; }

}

This happend after upgrading to CMS 12.

Any ideas?



 

#308874
Edited, Sep 22, 2023 10:48
Vote:
 

Seems like the input is a string, not a list of strings.

You could check in CMS/Settings/Content Types/FactBlock, that your property is in fact recognized as a string list. If it is not, then the property is not synced correctly.

#309432
Sep 23, 2023 23:01
Vote:
 

It looks like the property is recognized as a string list:

Any other things I could try?

#309478
Sep 25, 2023 7:46
Vote:
 

You don't need  [UIHint("StringsCollection")] as a decorator. In CMS 12 it is enough to have it as IList<string>.
The easy fix is either change the name of the property to something else. I believe this issue is due to property was not synced after it had it's datatype changed (from string to List<string>) 

See this thread where it had a similar issue for commerce but I believe it should be same for CMS too -

https://world.optimizely.com/forum/developer-forum/Problems-and-bugs/Thread-Container/2022/3/commerce-14--net-5---making-product-property-culturuespecific-issue/

#309481
Sep 25, 2023 10:19
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.