London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Cannot save/update overridden properties

Vote:
0

I have overridden properties to make them culture-specific and required.I cannot save/update after overridding them. e.g. I have overridden category property of PageData Class and miquantity, maxquantity of VariationContent Class.

#207580
Sep 26, 2019 4:21
Vote:
0

Please share the code of overridden property and any customization on that (if any). I tested overriding a property (Category) and just copied original get/set code and it was working.

#207582
Sep 26, 2019 8:35
Vote:
0

Without seeing your code, it's hard to pinpoint what is the error, but making a property required may also be done like this:

[EditorDescriptorRegistration(TargetType = typeof(CategoryList))]
public class MakeCategoryRequiredEditorDescriptor : EditorDescriptor
{
    public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
    {
        base.ModifyMetadata(metadata, attributes);
        if (metadata.PropertyName == "icategorizable_category")
        {
            metadata.IsRequired = true;
        }
    }
}

#207687
Sep 30, 2019 21:07
* 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.