Exception while using SiteEdit with a Page Template in Template Builder

369 Views Asked by At

I am trying to enable SiteEdit on our Tridion 2011 SP1.

I have installed and configured SiteEdit.

I tried adding SiteEdit for a page through Template Builder by following the below steps and got the below exception.

  1. Created a page with two components
  2. In the page template I added the "Enable SiteEdit 2009" TBB below Dreamweaver template
  3. Added the Target type URI in the parameter TargetTypeURI of the parameter schema field.
  4. when executed it is throwing the below exception.

Debugging was started in process 'TcmTemplateDebugHost' with id 2464 Invalid item type. A page template, component template or template building block was expected. at Tridion.ContentManager.Templating.Engine.GetTemplate(TcmUri templateURI) at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.RunTemplate(Engine engine, Package package, String templateUri, String className) at Tridion.Templating.CSharpTemplate.CSharpSourceTemplate.Transform(Engine __engine, Package __package) at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.Transform(Engine engine, Template template, Package package) at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package) at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template) at Tridion.ContentManager.Templating.Compound.CompoundTemplateMediator.Transform(Engine engine, Template templateToTransform, Package package) at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package) at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template) at Tridion.ContentManager.Templating.Engine.TransformPackage(Template template, Package package) at Tridion.ContentManager.Templating.Debugging.DebuggingEngine.Run() at Tridion.ContentManager.Templating.Debugging.DebugSession.Run()

1

There are 1 best solutions below

7
On BEST ANSWER

The steps for installing the Template Building Blocks are documented here. It looks like you made a mistake either in step 2 when uploading the assembly or in step 7 when installing Enable SiteEdit 2009.tbbcs.

Create the C# fragment for Enabling SiteEdit 2009

In this 7 step you must paste this code into a new C# TBB:

<%RunTemplate Template="tcm:0-0-0"
        Class="Tridion.ContentManager.Templating.Templates.EnableSiteEdit"%>

And then change the value of the Template attribute to match with the TCM URI of the Assembly you created in step 2. So it will look something like:

<%RunTemplate Template="tcm:1-479-2048"
        Class="Tridion.ContentManager.Templating.Templates.EnableSiteEdit"%>

The first two numbers (1 and 479 above) will very likely be different on your system. But the last number will always be 2048. It looks like you may have gotten the URI wrong and you have it ending in -2464.

Double check the TCM URI of your Assembly TBB against the one in the Template attribute and make sure they match.

Upload the Assembly

If you find yourself stuck figuring out TcmUploadAssembly, you can also choose to create upload the DLL into Tridion from the web GUI. Simply create a new TBB, set the language to Assembly and choose Load from disk.