SharePoint 网站定义未显示在模板列表中 - 为什么?

发布于 2024-07-06 16:45:35 字数 466 浏览 11 评论 0原文

我有一些通过 SharePoint wsp 解决方案包部署的自定义 SharePoint 网站定义。 它们看起来工作得很好。 我可以通过 stsadm 命令行很好地部署它们,并且在某些功能中运行的 C# 代码也可以基于它们部署站点。 部署解决方案时,我的 webtemp.*.xml 文件似乎已正确放置在 12\1033\XML 文件夹中。 我的问题是,当我尝试创建网站集时,它们没有显示在中央管理应用程序中。为什么不呢? 我什至不知道去哪里寻找这个。


编辑:

嗯..大约一个小时后,我碰巧返回到创建网站集页面,我的模板就在那里。 我不知道发生了什么......奇怪的缓存某处或某事。

我还应该更清楚地知道这些解决方案包已在我的开发盒上成功部署了多次,因此我没想到在这台其他服务器上会出现问题(无论如何部署方面)。

I have some custom SharePoint site definitions that are deployed via SharePoint wsp solution packages. They appear to work fine. I can deploy them fine via the stsadm command line, and my C# code running in some features can also deploy sites based on them. My webtemp.*.xml files appear to be correctly placed in the 12\1033\XML folder when my solutions are deployed. My problem is that they just don't show up in the central admin app when I try to Create Site Collection. Why not? I don't even know where to look for this.


EDIT:

Hmmm.. About an hour later I happened to go back to the create site collection page and my templates were there. I'm not sure what was up... weird caching somewhere or something.

I also should have been more clear that these solution packages had been successfully deployed many times on my dev box, so I didn't expect there to be a problem (with the deployment aspect anyway) on this other server.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

给我一枪 2024-07-13 16:45:35

SharePoint 中的许多任务都会排队,然后通过计时器作业执行。 IISReset 会导致 Web 应用程序重新加载到内存中,并重新加载配置信息(例如 web.config)。

要给 SharePoint 一个“推动”并导致作业执行,您可以尝试:

stsadm -o execadmsvcjobs

Many tasks in SharePoint are queued and then executed via timer job. An IISReset causes the web applicationt to be reloaded into memory and for configuration information for example the web.config to be reloaded.

To give SharePoint a "nudge" and cause jobs to execute you might try:

stsadm -o execadmsvcjobs
懵少女 2024-07-13 16:45:35

您是否启用了发布功能? 我读到内容类型无法保存在模板中,因此它们不允许将发布网站制作为模板。 这可能与为什么他们不会向您展示您已经制作的内容有关。

尽管我无法访问中央管理员进行验证,但我的网站集中就是这种情况。

Do you have the publishing feature enabled? I read that content types can't be saved in templates, so they don't allow publishing sites to be made into templates. This is perhaps linked to why they won't show you the ones you already made.

Although I don't have access to a central admin to verify, this is the case from within my site collection.

口干舌燥 2024-07-13 16:45:35

您是否忘记运行 iisreset ?
这是 SharePoint 重新加载网站模板所必需的。

Did you forget to run iisreset ?
This is needed for SharePoint to reload site templates.

妄想挽回 2024-07-13 16:45:35

如果您使用记录中心作为根网站的模板,则在创建新列表时,模板库中的模板(.stp 文件)将不会显示。

有一些奇怪的错误导致了这种情况的发生。

以下是您可以尝试在 SharePoint PowerShell 中运行的代码。 如果您有从记录中心模板创建的根网站,则 GetCustomListTemplates($web).Count 的返回值将为零。

$site = get-spsite("http://localhost")
$web = $site.RootWeb
$list = $web.Lists["TestDocLibrary"]
$list.SaveAsTemplate("MyListTemplate.stp", "MyListTemplate", "My List Template", $false)
$site.GetCustomListTemplates($web).Count

可以在以下链接中找到更多信息:

If you use the Record Center as the template for your root website, templates (.stp files) in your template library will not show up when creating a new list.

There is some weird bug that makes this happen.

Here is code that you can try running in the SharePoint PowerShell. The return value for GetCustomListTemplates($web).Count will be zero if you have the root web made from the Record Center template.

$site = get-spsite("http://localhost")
$web = $site.RootWeb
$list = $web.Lists["TestDocLibrary"]
$list.SaveAsTemplate("MyListTemplate.stp", "MyListTemplate", "My List Template", $false)
$site.GetCustomListTemplates($web).Count

More information can be found at the following links:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文