1
votes

Sitecore 8.0U5, Glass 4, TDS 5.0.1.11

I've got an interesting problem here and I feel like I'm just being dense somewhere, but can't figure it out.

I've got a template in Sitecore called "Testimonial" that has text fields like "Quote", "Name", "Location". It additionally has a field named "Image" of type "Image".

TDS generates my code and the properties of the template look normal. When viewing the rendering, all the fields are mapped appropriately except for the "Image" field. It is always "NULL".

The image is displayed in my view rendering only when viewing in the Experience Editor. When I 'Preview' or browse to the page, the image does not display. To complicate things, when I put a breakpoint on the rendering line and inspect in either Experience Editor or Preview, "Image" is still NULL. So even though it doesn't appear to be mapped, it still works in the Experience Editor.

I'm running locally and have my site pointed to the master database.

Anyone seen anything like this or have any ideas for additional ways to troubleshoot?

Thanks!

1
Check the language of the image. Can you show the generated model?Michael Edwards

1 Answers

0
votes

Okay, this is not an issue with Glass. (Not directly, at least) The issue is that there is a third-party module that has a template named Image and when that was mapped by TDS, it was interfering with Sitecore's Image class.

I'm not sure if this was the best solution, but what I ended up doing was editing the T4 template to look for this specific template and update the name when the class is generated. This keeps the module template named appropriately and keeps the compiled code clean as well.