I'm wondering what I'm doing wrong here. I have a simple page type in EpiServer 7 which is causing me headaches. Here's the code (I changed properties' names a bit).
[ContentType(DisplayName = "SimplePage", GUID = "02e235cb-dc6b-4ed7-8827-c481c6f7df98", Description = "")]
public class SimplePage : PageData
{
[Display(
Name = "Foo 1",
Description = "",
GroupName = SystemTabNames.Content,
Order = 20)]
public virtual PageReference Foo1 { get; set; }
[Display(
Name = "Foo 2",
Description = "",
GroupName = SystemTabNames.Content,
Order = 30)]
public virtual bool Foo2 { get; set; }
[BackingType(typeof(PropertyImageUrl))]
[Display(
Name = "Image",
Description = "",
GroupName = SystemTabNames.Content,
Order = 40)]
public virtual string Image { get; set; }
[Display(
Name = "Foo 3",
Description = "",
GroupName = SystemTabNames.Content,
Order = 50)]
public virtual XhtmlString Foo3 { get; set; }
}
The strange thing is that everything else works fine but not storing the Image property's value. So Foo1, Foo2, Foo3 is stored OK but not Image property.
Problem occurs when I try to publish the simplepage. Episerver doesn't give me any errors but if I close the browser and reopen the simplepage Image property is empty even though it had value before publishing. Sometimes autosave gives me "offline, can't save" error, or at least I think it's the autosave, anyway I can still publish changes to other properties but not Image.
Now if I remove Image property from the code and create it using Admin view it works fine. This implies that there must be something wrong in my code but can't figure out what...
Hello, all!
I'm wondering what I'm doing wrong here. I have a simple page type in EpiServer 7 which is causing me headaches. Here's the code (I changed properties' names a bit).
The strange thing is that everything else works fine but not storing the Image property's value. So Foo1, Foo2, Foo3 is stored OK but not Image property.
Problem occurs when I try to publish the simplepage. Episerver doesn't give me any errors but if I close the browser and reopen the simplepage Image property is empty even though it had value before publishing. Sometimes autosave gives me "offline, can't save" error, or at least I think it's the autosave, anyway I can still publish changes to other properties but not Image.
Now if I remove Image property from the code and create it using Admin view it works fine. This implies that there must be something wrong in my code but can't figure out what...
Any help would be greatly appreciated.
-Marko