MOSS:从发布网站创建网站模板
在我的 MOSS 网站上,我尝试将发布网站保存为网站模板。然后从此模板创建子网站。
我能够成功创建网站模板,并将其填充到网站模板库中。按照这些说明进行操作。http://blah.winsmarts.com/2007-7-All_you_ever_wanted_to_know_about_SharePoint_2007_Site_Templates .aspx
但是,当我尝试从此模板创建子网站时,会显示一条错误消息,指出:
The template you have chosen is invalid or cannot be found. at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
当我将网站模板保存为 .stp 文件,然后重命名为 .cab 并提取并查看 Manifest.xml 时,我看到 TemplateID = 39。这与 CMSPublishing 模板哪个具有相同的 ID?
如果是这样,我该如何更改 ID 并重新打包 cab 文件?
--编辑-- 我尝试将 ID 从 39 更改为 327 并重新打包 cab 并上传,尽管在创建子站点时站点模板确实显示为一个选项......因此,如果多个模板具有相同的 templateID,则并不重要。
非常感谢, 导航
On my MOSS site I am trying to save a publishing site as a site template. Then create subsites from this template.
I am able to sucessfully create the site template and it is populated in the site template gallery. Following these instructions.. http://blah.winsmarts.com/2007-7-All_you_ever_wanted_to_know_about_SharePoint_2007_Site_Templates.aspx
But when I try and create a subsite from this template, an error message is displayed stating:
The template you have chosen is invalid or cannot be found. at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
When I save the site template as a .stp file then rename to a .cab and extract and view the manifest.xml, I see that the TemplateID = 39. Is this conflicting with the
the CMSPublishing template which has the same ID?
If so how do I change the ID and repackage the cab file?
--Edit-- I tried changing the ID from 39 to a 327 and repacking the cab and uploading though the site template does appear as an option when creating subsites.... So it does not matter if multiple templates have the same templateID.
Many Thanks,
Nav
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看共享点诊断日志后,我发现从失败的模板应用的功能。
将网络功能与共享点列出的网络和站点功能列表进行比较,我删除了列表中没有的功能,特别是那些无法从日志中应用的功能。
使用下面的 cabarc N 命令重建输出到 stp 文件的 cab 文件:
http://billwg.blogspot.com/ 2009/04/how-to-modify-project-portal-site.html
然后发布模板已成功应用,请注意,一旦创建网站,您将必须重新打开发布功能。
下面是从 stp 的 manifest.xml 中提取的 webfeatures 提取到 cab 文件后的摘录
After looking at the sharepoint diagnostic logs i found that features were being applied from the template that were failing.
Comparing web features to the list of sharepoint listed web and site features i deleted the ones not in the list in particular those features which were failing to be applied from the logs.
Rebuilt the cab file outputted to stp file using the cabarc N command below:
http://billwg.blogspot.com/2009/04/how-to-modify-project-portal-site.html
Then the publishing template was successfully applied, notice you will have to turn the publishing feature back on once the site is created.
Below is an extract of the webfeatures taken from the manifest.xml from the stp after extracting to a cab file