MOSS:从发布网站创建网站模板

发布于 2024-09-01 10:00:55 字数 1027 浏览 3 评论 0原文

在我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我纯我任性 2024-09-08 10:00:55

查看共享点诊断日志后,我发现从失败的模板应用的功能。

将网络功能与共享点列出的网络和站点功能列表进行比较,我删除了列表中没有的功能,特别是那些无法从日志中应用的功能。

使用下面的 cabarc N 命令重建输出到 stp 文件的 cab 文件:
http://billwg.blogspot.com/ 2009/04/how-to-modify-project-portal-site.html

然后发布模板已成功应用,请注意,一旦创建网站,您将必须重新打开发布功能。

下面是从 stp 的 manifest.xml 中提取的 webfeatures 提取到 cab 文件后的摘录

<WebFeatures>
<Feature ID="e8734bb6-be8e-48a1-b036-5a40ff0b8a81"/>
<Feature ID="56dd7fe7-a155-4283-b5e6-6147560601ee"/>
<Feature ID="0be49fe9-9bc9-409d-abf9-702753bd878d"/>
<Feature ID="99fe402e-89a0-45aa-9163-85342e865dc8"/>
<Feature ID="541f5f57-c847-4e16-b59a-b31e90e6f9ea">
<Properties>
<Property Key="InheritGlobalNavigation" Value="true"/>
<Property Key="ShowSiblings" Value="true"/>
<Property Key="IncludeSubSites" Value="true"/>
</Properties>
</Feature>
</WebFeatures>

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

<WebFeatures>
<Feature ID="e8734bb6-be8e-48a1-b036-5a40ff0b8a81"/>
<Feature ID="56dd7fe7-a155-4283-b5e6-6147560601ee"/>
<Feature ID="0be49fe9-9bc9-409d-abf9-702753bd878d"/>
<Feature ID="99fe402e-89a0-45aa-9163-85342e865dc8"/>
<Feature ID="541f5f57-c847-4e16-b59a-b31e90e6f9ea">
<Properties>
<Property Key="InheritGlobalNavigation" Value="true"/>
<Property Key="ShowSiblings" Value="true"/>
<Property Key="IncludeSubSites" Value="true"/>
</Properties>
</Feature>
</WebFeatures>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文