We're getting the error below when rendering a legacy VBScript component template (presentation) from a .NET page template.
The .NET code to do the rendering is straightforward:
var sb = new StringBuilder();
foreach (var presentation in page.ComponentPresentations)
{
sb.AppendLine(engine.RenderComponentPresentation(presentation.Component.Id, presentation.ComponentTemplate.Id));
}
Further relevant context info:
- Tridion 2013 SP1 (with LegacyPack)
- Static component template
- .NET 4.5
- Windows Server 2008 R2 Standard
Anyone dealt with this issue before and/or knows how to solve? Any clue would be helpful. Thanks.
Here's the error:
Error: This key is already associated with an element of this collection UtilitiesPublish.RenderComponentPresentation ComponentPresentation.Render ComponentTemplate.Render UtilitiesPublish.RenderComponentPresentation ComponentPresentation.Render Component.Render at Tridion.ContentManager.Publishing.Legacy.Rendering.ComponentPresentationRenderer.Render(ResolvedItem resolvedItem, PublishInstruction instruction, PublicationTarget target, RenderedItem renderedItem, RenderContext context) at Tridion.ContentManager.Publishing.Rendering.RenderEngine.Render(ResolvedItem resolvedItem, PublishInstruction instruction, PublicationTarget target, RenderContext context) at Tridion.ContentManager.Publishing.Rendering.RenderEngine.Render(IdentifiableObject item, Template template, PublishInstruction instruction, PublicationTarget target, RenderContext context) at Tridion.ContentManager.Templating.Engine.RenderComponentPresentation(TcmUri componentUri, TcmUri componentTemplateUri)