Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

The issue with a property of type IList<string> in a local block

Vote:
 

When utilizing the IList<string> property in CMS mode within a local block, the property's built-in UI will not function properly. Conversely, if the IList<string> property is directly employed on the Page, this problem will not arise.

This issue occurred starting from EPiServer.CMS 12.18.0. I tested it on the previous version and it worked fine.
Details: I created a local block below :

using System.ComponentModel.DataAnnotations;

namespace Alloy.Models.Blocks
{
    [SiteContentType(GUID = "937C7DB8-EF6C-4E7B-B128-63818EB9DA67")]
    [SiteImageUrl]
    public class TestBlock : SiteBlockData
    {
        [Display(
            GroupName = SystemTabNames.Content,
            Order = 1)]
        [CultureSpecific]
        public virtual IList<string> Tags { get; set; }
    }
}


And use it as a property on the page :

using System.ComponentModel.DataAnnotations;
using Alloy.Models.Blocks;

namespace Alloy.Models.Pages
{
    /// <summary>
    /// Used to present a single product
    /// </summary>
    [SiteContentType(
        GUID = "17583DCD-3C11-49DD-A66D-0DEF0DD601FC",
        GroupName = Globals.GroupNames.Products)]
    [SiteImageUrl(Globals.StaticGraphicsFolderPath + "page-type-thumbnail-product.png")]
    [AvailableContentTypes(
        Availability = Availability.Specific,
        IncludeOn = new[] { typeof(StartPage) })]
    public class ProductPage : StandardPage, IHasRelatedContent
    {
        [Required]
        [Display(Order = 305)]
        [UIHint(Globals.SiteUIHints.StringsCollection)]
        [CultureSpecific]
        public virtual IList<string> UniqueSellingPoints { get; set; }

        [Display(
            GroupName = SystemTabNames.Content,
            Order = 330)]
        [CultureSpecific]
        [AllowedTypes(new[] { typeof(IContentData) }, new[] { typeof(JumbotronBlock) })]
        public virtual ContentArea RelatedContentArea { get; set; }

        [Display(
            GroupName = SystemTabNames.Content,
            Order = 350)]
        public virtual TestBlock TestBlock { get; set; }
    }
}

Issue on CMS 12.18:


And it worked fine on CMS 12.17.1:



#299498
Edited, Apr 04, 2023 6:53
Vote:
 

Seems like a bug (although I can't see your second screenshot, care to re-upload it). I will file a bug for the Content app team. Thanks for bringing this into our attention

#299505
Apr 04, 2023 8:57
Quan Mai - Apr 04, 2023 9:43
bug is CMS-27370
Quan Mai - Apr 05, 2023 11:30
Apparently bug CMS-27369 was already existing and is fixed by now. will be in the next release
Vijay - Apr 10, 2023 7:07
We experienced the same problem after upgrading to EPiServer.CMS 12.18.0. A lot of functionalities were damaged, which had a significant effect on my client. As you noted, the bug has been addressed and will be included in the following release. Please let me know when it will be available.
Quan Mai - Apr 11, 2023 6:35
it should be released in cms 12.19.0. i asked the team to make the bug public
Quan Mai - Apr 11, 2023 7:15
https://world.optimizely.com/support/bug-list/bug/CMS-27369 now you can follow it here
Vijay - Apr 11, 2023 7:29
Thanks for making this bug as public. May i know when the version 12.19.0 will be released to public ?
Quan Mai - Apr 11, 2023 8:48
it is under testing, and we can only release when the QAs give the greenlight. based on the current progress, I would GUESS it will be some time next week
Vijay - Apr 11, 2023 8:56
Thanks for the update.
Bartosz Sekula - Apr 28, 2023 8:13
It's been fixed in https://nuget.optimizely.com/package/?id=EPiServer.CMS.UI&v=12.19.0
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.