Type Models.NewsArticle does not have a Template ID or Branch ID

128 views
Skip to first unread message

Patrick Lafrance

unread,
May 14, 2013, 3:34:28 PM5/14/13
to glass...@googlegroups.com
Hi,

Everytime I try to create a new item using SitecoreService.Create I get the following GlassMapperException: Type Models.NewsArticle does not have a Template ID or Branch ID.

I am using the auto mapping feature and I added the following attribute to my class as shown in the tutorial:

[SitecoreType( TemplateId = "{8FB185C4-4C0C-4066-8131-2C119C9B251F}", AutoMap = true)]
public class NewsArticle

I have downloaded the following package from Nuget: Glass.Mapper.Sc.CastleWindsor and I am running Sitecore 6.6 with .NET 4.5 on a Windows 8 desktop. 

I haven't done any modifications to Sitecore, this is a fresh installation and I dont have any custom configuration to GlassMapper, all I did are the first 11 steps of the GlassMapper tutorial.

You can find the code I am running here: http://pastebin.com/tVZGqsSe

Do you have any idea of the problem ?

Thank you.

Patrick


Conaire Creaney

unread,
Mar 6, 2014, 12:30:51 AM3/6/14
to glass...@googlegroups.com
Hi Patrick, 

Have you had any joy fixing this error. I am stuck with the same error.

Thanks
Reply all
Reply to author
Forward
0 new messages