6

I'm Using Razor Mediator and when I publishing i'm getting unable to get template type with id:8 while publishing.

5
  • 2
    Hi Abdulla, This question is a bit light on detail and doesn't really meet our quality standards in its current form. Do you think you could update it please with more information and what you tried already to solve your issue? Oct 30 '14 at 11:24
  • +1 to Rob - Abdulla - what have you tried... can you publish anything (SGs, Components, Pages). Can you preview pages? Is this for specific pages/content types? Oct 30 '14 at 21:37
  • Nearly identical to this SE question.
    – Alvin Reyes
    Oct 31 '14 at 2:22
  • any update Abdulla?
    – Raj Kumar
    Oct 31 '14 at 5:12
  • I have already installed Razor Mediator V1.2.2 in my Content Manager Server which is separated from Publisher Server. In my cms servers Publishing Services are Stopped. And I have Seperate Publishing Servers. I'm able to preview the razor mediator value which is nothing but just @Page.Title in preview mode but when I publish I got the error message : "Unable to get the Template Type with Id : 8" Nov 2 '14 at 4:48
5

Razor seems to be registered with different id or its not installed at your CMS server, but template expecting it with Id:8

Check your Tridion.ContentManager.config, it should be like below:

 <add id="8" name="RazorTemplate" mimeType="text/x-tcm-cshtml"
hasBinaryContent="false"
 contentHandler="Tridion.Extensions.Mediators.Razor.RazorContentHandler,
 Tridion.Extensions.Mediators.Razor, Version=1.3.3.1, Culture=neutral,
 PublicKeyToken=5eeceedb34d9dfd7">
    <webDavFileExtensions>
     <add itemType="TemplateBuildingBlock" fileExtension="cshtml" />
    </webDavFileExtensions>   </add>
5
  • The Id is 8 in the config file. Oct 30 '14 at 9:15
  • Is razor installed(properly)? try restarting the com service if its installed.
    – Raj Kumar
    Oct 30 '14 at 9:26
  • Com+ Services, IIS and Application Pool and even CMS Servers are also restarted Nov 2 '14 at 5:08
  • Is Razor installed on your all Publishing Servers? because while rendering on specific server razor would be required.
    – Raj Kumar
    Nov 2 '14 at 8:19
  • I have had this error before and the Razor Mediator was not installed on the server, and therefore the CMS did not recognize the 'template type' of the Razor template. My advice would be to uninstall the Razor Mediator, restart, install the Razor Mediator, and finally restart again. I would then test it by creating a new Razor TBB and doing as you did previously, @Page.Title in a Page Template TBB, and preview in Template Builder.
    – robrtc
    Nov 4 '14 at 6:01
2

If your Publisher is out-scaled to another server (separate to your Content Manager server), then you will also need to install, and configure, the Razor Mediator on that server too.

It is also worth noting that you have to restart the Tridion Publisher Windows Service after installing (or making any configuration changes to) the Razor Mediator.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.