Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I got a "a non-generated template is already present" error using TcmUploadAssembly

We've been using TcmUploadAssembly to update the C# TBBs in a Tridion 2013 installation, and have recently come across:

Error: Cannot generate template with name Correct Self Closing Elements, 
since a non-generated template is already present.

In our case "Correct Self Closing Elements" is the name of a C# class. It is contained in an assembly that had previously been uploaded and was working correctly. At this point the C# project compiles properly, the assembly is included as a TBB, and the class is included as a TBB that references the assembly.

like image 321
Paul Russell Avatar asked Apr 25 '16 15:04

Paul Russell


1 Answers

One of our users had manually created the TBB entry within Tridion. He had the code entered as:

<%RunTemplate Template="tcm:14-29653-2048"
  Class="Tridion.AccountCenter.TemplateBuildingBlocks.CorrectSelfClosingElements"%>

What he had left out, from his copy & paste, was a seemingly innocuous comment above that. The code that he pasted should have read:

/* This template was generated through the Tridion Assembly Template Upload */
<%RunTemplate Template="tcm:14-29653-2048"
  Class="Tridion.AccountCenter.TemplateBuildingBlocks.CorrectSelfClosingElements"%>

TcmUploadAssembly looks for that comment explicitly, and throws the "non-generated" error if it doesn't find it.

like image 131
Paul Russell Avatar answered Jan 03 '23 22:01

Paul Russell