【问题标题】:Exception while using SiteEdit with a Page Template in Template Builder在模板生成器中将 SiteEdit 与页面模板一起使用时出现异常
【发布时间】:2012-05-26 11:09:00
【问题描述】:

我正在尝试在我们的 Tridion 2011 SP1 上启用 SiteEdit。

我已经安装并配置了 SiteEdit。

我尝试按照以下步骤通过模板生成器为页面添加 SiteEdit,并得到以下异常。

  1. 创建了一个包含两个组件的页面
  2. 在页面模板中,我在 Dreamweaver 模板下方添加了“启用 SiteEdit 2009”TBB
  3. 在参数架构字段的参数 TargetTypeURI 中添加了目标类型 URI。
  4. 执行时会抛出以下异常。

调试已在进程“TcmTemplateDebugHost”中启动,ID 为 2464 无效的项目类型。需要页面模板、组件模板或模板构建块。 在 Tridion.ContentManager.Templating.Engine.GetTemplate(TcmUri templateURI) 在 Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.RunTemplate(引擎引擎,包包,字符串 templateUri,字符串类名) 在 Tridion.Templating.CSharpTemplate.CSharpSourceTemplate.Transform(引擎 __engine,包 __package) 在 Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.Transform(引擎引擎,模板模板,包包) 在 Tridion.ContentManager.Templating.Engine.ExecuteTemplate(模板模板,包包) 在 Tridion.ContentManager.Templating.Engine.InvokeTemplate(包包,TemplateInvocation 模板调用,模板模板) 在 Tridion.ContentManager.Templating.Compound.CompoundTemplateMediator.Transform(引擎引擎,模板 templateToTransform,包包) 在 Tridion.ContentManager.Templating.Engine.ExecuteTemplate(模板模板,包包) 在 Tridion.ContentManager.Templating.Engine.InvokeTemplate(包包,TemplateInvocation 模板调用,模板模板) 在 Tridion.ContentManager.Templating.Engine.TransformPackage(模板模板,包包) 在 Tridion.ContentManager.Templating.Debugging.DebuggingEngine.Run() 在 Tridion.ContentManager.Templating.Debugging.DebugSession.Run()

【问题讨论】:

  • 您能否描述一下您是如何安装“启用 SiteEdit 2009”TBB 的,因为那里似乎出了点问题。
  • Tridion.ContentManager.Templating.SiteEdit.dll 是使用 TCMUploadAssembly 在另一个出版物中上传的,我在上传时遇到了问题(异常:“错误:选择了 PDB 上传,但找不到 PDB 文件”)相同的程序集。所以我从其他出版物中复制了 tbbcs 文件并使用 webdav 粘贴到我的出版物中。我拥有所需的所有参数架构。
  • 您没有此程序集的 PDB,因此您不应在命令行上指定 /uploadpdb:true。除此之外,上传此 DLL 应该与您自己创建的任何其他 DLL 没有什么不同。

标签: tridion


【解决方案1】:

安装模板构建块的步骤记录在here。看起来您在上传程序集时的第 2 步或安装 Enable SiteEdit 2009.tbbcs 的第 7 步中犯了一个错误。

为启用 SiteEdit 2009 创建 C# 片段

在这 7 步中,您必须将此代码粘贴到新的 C# TBB 中:

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

然后将Template 属性的值更改为与您在第2 步中创建的程序集的TCM URI 匹配。所以它看起来像:

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

前两个数字(上面的 1 和 479)在您的系统上很可能会有所不同。但最后一个数字将始终是 2048。看起来您可能弄错了 URI,并且它以 -2464 结尾。

根据Template 属性中的 TCM URI 仔细检查您的程序集 TBB 的 TCM URI,并确保它们匹配。

上传程序集

如果您发现自己无法弄清楚TcmUploadAssembly,您还可以选择创建从 Web GUI 上传到 Tridion 的 DLL。只需创建一个新的 TBB,将语言设置为 Assembly 并选择 Load from disk

【讨论】:

  • 非常感谢。按照您的指示解决了我的问题。
  • 很抱歉提出这个基本问题。我是第一次实施siteEdit。现在我完成了 dll 参数模式的上传。 .如何配置发布目标(我必须发布页面以便我可以看到站点编辑工具栏(配置网络服务器并从内容管理器链接发布)。在这个阶段我有点困惑。我添加了站点编辑 tbb并发布页面。它已发布到登台服务器(不是安装 siteEdit 的机器)。当我在 IE 中打开页面时,我无法看到 siteEdit 链接来编辑内容。请帮助。
  • 您使用 SiteEdit 命令(
猜你喜欢
  • 2011-09-07
  • 2021-07-26
  • 2012-06-07
  • 1970-01-01
  • 2013-03-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多