Sitecore-Glassmapper error "Guid should contain digits with 4 dashes...."

51 views
Skip to first unread message

Piyush Trivedi

unread,
Oct 15, 2014, 9:06:13 AM10/15/14
to glass...@googlegroups.com
Hi,

We added glassmapper to an existing Sitecore MVC project(the project also has webform pages). Almost everything works fine except for the following lines of code :

@Html.Sitecore().Rendering("/sitecore/layout/Renderings/Mvc2014/Footer/Breadcrumb")

@Html.Sitecore().Rendering("/sitecore/layout/Renderings/Mvc2014/Footer/RelatedLinks")

@Html.Sitecore().Rendering("/sitecore/layout/Renderings/Mvc2014/Footer/SocialButtons")

@Html.Sitecore().Rendering("/sitecore/layout/Renderings/Mvc2014/Footer/PartnerLogos")

@Html.Sitecore().Rendering("/sitecore/layout/Renderings/Mvc2014/Footer/Copyright")

@Html.Sitecore().Rendering("/sitecore/layout/Renderings/Mvc2014/Footer/FooterText")

@Html.Sitecore().Rendering("/sitecore/layout/Renderings/Mvc2014/Footer/Doormat")
 
the same works fine if we replace the path of the renderings with the respective guids as follows

@Html.Sitecore().Rendering("{64121396-29D6-4B30-A6E9-CD468AA6C217}")

We validate that the item fields are fine and they work fine when accessed using guid instead of paths. Not sure if where we are going wrong.
Please find the error stack as attachment.

Environment Details:
1.Sitecore Version 7.1
2.MVC 4.0
3.Glassmapper version 2.0.10.0
4.Glass Mapper CastleWinsdsor.dll 3.1.5.16
5.Glass Mapper SC razor 3.0.9.13
6.Glass Mapper SC.dll 3.1.9.30

Any help on this would be highly appreciate. Do let us know if any more information is  required

thanx

piyush

GlassError.png

Chirag Patel

unread,
Oct 21, 2014, 11:47:57 AM10/21/14
to glass...@googlegroups.com
Have you tried putting the file extension at the end of the path?

@Html.Sitecore().Rendering("/sitecore/layout/Renderings/Mvc2014/Footer/Doormat.cshtml")

You may also want to try:

@Html.Sitecore().ViewRendering("/sitecore/layout/Renderings/Mvc2014/Footer/Doormat")
or
@Html.Sitecore().ViewRendering("/sitecore/layout/Renderings/Mvc2014/Footer/Doormat.cshtml")


Reply all
Reply to author
Forward
0 new messages