Try our conversational search powered by Generative AI!

Why is a value not being set on my custom property? (EPiImage)

Vote:
 

I'm working with EPImage for CMS 7 taken from https://github.com/tuanvt/EPiImage-7.1 (via the comments on this thread: http://world.episerver.com/Blogs/Alexander-Haneng/Dates/2013/1/EPiImage-and-EPiServer-7/).

 

A single image property works fine e.g.

[Display(
    GroupName = SystemTabNames.Content,
    Order = 20)]
[UIHint(Constants.EPiImageUiHint)]
[BackingType(typeof(EPiImageProperty))]
public virtual EPiImagePropertyData Image { get; set; }

  

But the image gallery isn't working. The property on my PageType never gets assigned a value. Editing works, and the value is being persisted in the database (I've confirmed this by inspecting the database manually, as well as the correct data being presented in the editor UI after a refresh).

I've added the code below to try and catch the call to the setter but it never gets hit.

 private EPiImageGalleryImageCollection _images;

[Display(
    GroupName = SystemTabNames.Content,
    Order = 20)]
[UIHint(Constants.EPiImageGalleryUiHint)]
[BackingType(typeof (EPiImageGalleryProperty))]
public virtual EPiImageGalleryImageCollection Images
{
    get
    {
        if (Debugger.IsAttached)
            Debugger.Break();
        return _images;
    }
    set
    {
        if (Debugger.IsAttached)
            Debugger.Break();
        _images = value;
    }
}

    

So what part of EPiServer is deciding not to bind a value to the Images propert?

 

#73270
Jul 12, 2013 10:59
Vote:
 

I've just downloaded the 7.x branch of main project on coderesort (https://www.coderesort.com/p/epicode/browser/MakingWaves.EPiImage/7.x) and that suffers from the same symptom.

#73273
Jul 12, 2013 12:39
Vote:
 

Hi mate, 

Try to grab the latest code from github now, I have updated with a fix for gallery property, somehow the code on github was not up to date.  Here is the code that I declare when using on page type: 

[Editable(true)]
[Display(
Name = "Images",
Description = "Carousel Image Collection",
GroupName = SystemTabNames.Content,
Order = 20)]
[BackingType(typeof(EPiImageGalleryProperty))]
[UIHint(EPiImage.Constants.EPiImageGalleryUiHint)]
public virtual EPiImageGalleryImageCollection Images { get; set; }

 

Please make sure you have the following on your module.config file :


<add assembly="EPiImage" />

 

This is because I use Rest Controller to load the images file with ID.

If it is still not working for you, please lets me know.

 

Thanks

 

 

#73648
Aug 03, 2013 6:31
Vote:
 

Hi Tuan,

Sorry for the super-late reply on this. Regarding your code on GitHub, is it a full and selfcontained project or does it still require the MakingWaves.EPiImage.dll? Where is the image resizing implemented?

Thanks,
Greg

#87835
Jun 24, 2014 11:33
* 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.