Closed drachele closed 9 years ago
Hi
If i have an empty field I get Null for the image. Could you see if there is a value in the field in Raw values mode?
Thanks
Mike
Hi Mike,
Viewing raw values in Sitecore, the field for the image is definitely empty.
Cheers, Dan.
What Sitecore version are you using?
On Thu, 18 Jun 2015 02:53 Daniel Rachele notifications@github.com wrote:
Hi Mike,
Viewing raw values in Sitecore, the field for the image is definitely empty.
Cheers, Dan.
— Reply to this email directly or view it on GitHub https://github.com/mikeedwards83/Glass.Mapper/issues/142#issuecomment-113009362 .
Sitecore.NET 7.2 (rev. 140526)
I'm also having the same issue with the File type. Src is null and the ID is Guid.Empty.
Are you still having this problem? I am still not able to replicate this.
Afraid so.
Is there any more information I could provide you with to try and replicate the issue?
Hey Mike,
I have just installed Sitecore 7.2 update 4 to check this and was able to replicate the same behavior. I added an image field to the default /sitecore/content/home item and added a test sublayout. Here is a link to my quick prototype project in web forms http://www.cmsbestpractices.com/GlassTest.zip
Ok I have replicated and push a fix to develop. Could you download the latest nightly build 4.0.1.35
fixed in 4.0.2
I have a class with a property of type Glass.Mapper.Sc.Fields.Image, and even if there is no value set in Sitecore, this property is being returned from Glass as an instance of Image, with empty values and an empty ID.
This is my domain model class:
I'm using the latest version (4.0.1.5). I've used version 3 in the past, and if there was no value set on the property, it would set as NULL, which is what I would expect in this version as well. In order to determine if an image is available, I now need to add extra code to check the ID of the Image property to check if the ID is something other than Guid.Empty.
Is this expected behaviour in the new version, or a bug?
Or am I missing something obvious?
Thanks, Dan.