Try our conversational search powered by Generative AI!

Validation error "Value cannot be null. Parameter name: s" when editing local block

Vote:
 

Hi

I have a pagetype with a local block. 

Whenever I edit the page and change any of the fields in the block, I get the following validation error: "Value cannot be null. Parameter name: s"

Request data:

URL: /EPiServer/cms/Stores/contentdata/3348_6684

Payload: {"id":"3348_6684","properties":{"media.image":"\"/Global/img10.jpg\""},"publishChanges":false}

Response: {}&&{"successful":false,"savedContentLink":"3348_6684","properties":[{"name":"media","value":null,"successful":false,"validationErrors":"Value cannot be null.\r\nParameter name: s"}],"validationErrors":[{"source":null,"validationType":0,"severity":3,"propertyName":null,"errorMessage":"Value cannot be null.\r\nParameter name: s","relatedProperties":[]}]}

 

This happens only when changing data in the block-property, and not when changing regular properties on the same page. 

It's a MVC solution with patch 4 installed. It occurs in all environments, dev, test, prod.

Anyone have any clues on what might be wrong? 

 

 

    [ContentType(GUID = "061b8d97-1fc6-48e2-85d2-387fcee15aa8", Order = 100)]
    [AvailablePageTypes(Availability.None)]
    public class CompanyPage : SimpleContentPage, IHaveMedia
    {
        [Display(Order = 10, GroupName = TabNames.Media)]
        public virtual MediaBlock Media { get; set; }

        // More properties
    }

    

    [ContentType(GUID = "7c8acad7-8538-4360-bc6f-77677ff05d5b", AvailableInEditMode = false)]
    public class MediaBlock : BlockData
    {
        [Display(Order = 100, GroupName = TabNames.Information)]
        [BackingType(typeof(PropertyImageUrl))]
        public virtual Url Image { get; set; }

        [Display(Order = 105, GroupName = TabNames.Information)]
        [BackingType(typeof(PropertyImageUrl))]
        public virtual Url Video { get; set; }

        [Display(Order = 106, GroupName = TabNames.Information)]
        [UIHint(UIHint.Textarea, PresentationLayer.Edit)]
        public virtual string VideoEmbedCode { get; set; }

        [CultureSpecific]
        [Display(Order = 110, GroupName = TabNames.Information)]
        public virtual string Description { get; set; }

        [CultureSpecific]
        [Display(Order = 120, GroupName = TabNames.Information)]
        public virtual string AlternateText { get; set; }
    }

    

#78848
Dec 04, 2013 11:39
Vote:
 

Which version of EPiSErver 7 are you running? I think I hade something similiar on 7.0 but that it disapeared in 7.1.

#78851
Dec 04, 2013 11:48
Vote:
 

Thanks for replying. Unfortunately it happens with both 7.0 and 7.1.

#78864
Dec 04, 2013 13:30
Vote:
 

Just found out that this only happens in forms-editing mode. If editing with OPE/PropertyFor it works fine.

#78871
Dec 04, 2013 14:08
Vote:
 

Fwiw, the cause was a custom IActionInvoker registered with StructureMap.

#79135
Dec 10, 2013 10:07
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.