Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Episerver propertylist not saving

$
0
0

Hello,

I have a property list with three properties, Name, Hex Value and Image (Image is of type contentreference).

Now I have a selectionFactory as shown below:

public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata)
{
if (!_contentLoader.TryGet<HomePage>(ContentReference.StartPage, out var HomePage))
{
return Enumerable.Empty<ISelectItem>();
}
return HomePage.BannerAlertBackgroundColors?.Select(x => new SelectItem { Text = x.ColorName, Value = (x.ColorHexValue + "," + x.BannerImage?.ID.ToString()) });
}

I have a block named Banner where I have drop down that gives me the property list with names as selection dropdown. Based on user selection  I am extracting the Color hex value and Image on UI.

The problem is this works in local but the moment I push this on Integration environment, All my homepage values are rendered blank and auto save doesn't work anymore.

I had this block already working, Image was the new item added in this one. I am assuming this is because image should be of JsonProperty type something? There are no logs to this issue as well.

Any idea what am doing wrong by including the image in the property list. Below is image type property:

[CultureSpecific]
[Display(
Name = "Banner Image")]
[AllowedTypes(typeof(Media.ImageFile))]
public virtual ContentReference BannerImage { get; set; }


Viewing all articles
Browse latest Browse all 9076

Trending Articles