Udostępnij za pośrednictwem


Custom Publishing Site definition is unavailable to create sub sites under publishing portal site collection

Have you ever wondered that why only the “Publishing Site with workflow” definition is available to create a sub site under the publishing portal site collection. In nutshell we know that the site definition which has the “VisibiltyfeatureDependency” for the publishing infrastructure feature ( Feature Id - F6924D36-2FA8-4f0b-B16D-06B7250180FA) will be available only if the publishing infrastructure is activated. Fair enough, but why the other site definitions like STS #0, STS #1 … etc are not available which don’t have any feature dependency for the visibility. See the screenshot below, only the “Publishing Site with workflow” definition is available to create the sub site when the top level site collection is created from the “Publishing Portal” :

First

1. Not all the site definitions will be available to create sub site. The definitions which has the “SubWebOnly” attribute enabled will be available. But why the site definitions which don’t have any restriction for visibility are not available while creating the sub site.

2. What if you created a custom publishing site definition to create ONLY the sub site under the publishing portal collection ? You can see in the above screen shot that except the “Publishing Site with workflow” site definition none of the other site definitions are available to create the sub site.

Following is the webtemp entry for the custom publishing site definition I created . You can see that I have the “VisibilityFeatureDependency” set to the publishing infrastructure feature and the “SubWebOnly” is set to “TRUE”. But still the custom publishing site definition is unavailable to create the sub site under the publishing portal site collection in which the publishing infrastructure feature is already stapled.

<Templates xmlns:ows="Microsoft SharePoint">

  <Template Name="FHLBPublishing" ID="10002">

    <Configuration ID="0"

Title="FHLB Publishing Site"

DisplayCategory="Custom Publishing"

Hidden="FALSE"

ImageUrl="/_layouts/images/FHLBPublishing/Preview.png"

VisibilityFeatureDependency="F6924D36-2FA8-4f0b-B16D-06B7250180FA" SubWebOnly="TRUE" RootWebOnly="false" />

    <Configuration ID="1"

Title="FHLB Publishing Portal"

DisplayCategory="Publishing"

Hidden="TRUE"

ImageUrl="/_layouts/images/PublishingMinimal/Preview.png"

ProvisionAssembly="FHLBMinPubSiteDef, Version=1.0.0.0, Culture=neutral, PublicKeyToken=44b8eff5c4cf5544"

ProvisionClass="FHLBMinPubSiteDef.ProvisioningEngine"

ProvisionData="SiteTemplates\\FHLBPublishing\\XML\\PortalConfig.xml"

RootWebOnly="false"

SubWebOnly="false" />

    <Configuration ID="2"

Title="FHLB Publishing Site with FHLB Serial Workflow"

Hidden="FALSE"

ImageUrl="/_layouts/1033/images/PublishingSite.gif"

Description="A FHLB site for publishing Web pages on a schedule by using approval workflows. It includes document and image libraries for storing Web publishing assets. By default, only sites with this template can be created under this site."

SubWebOnly="TRUE"

DisplayCategory="Publishing"

VisibilityFeatureDependency="978B4991-5233-4208-B348-A5C8FBD30E81"

                   />

  </Template>

</Templates>

Another interesting thing is if I create “Team Site” and activate the “Publishing infrastructure feature” then it behaves differently. You can see in the following screenshot that my custom publishing site definition is available to create the sub site and note that all other site definitions (STS #0, STS #1 .. etc) also available as they don’t have any dependency for visibility.

second

While digging into deep found the following behavior of SharePoint. When the “Publishing Infrastructure” enabled it gives another feature of selecting the template to be available to create the sub site. You can find this feature called “Page layouts and site templates” in the “Site Settings” page under the “Look and Feel” group.

third

It actually gives you the option of selecting the templates to avail while creating a sub site. In the team site when the publishing infrastructure is activated then this option is set to “Sub sites can use any site template” (See below screenshot) so all the templates are available to create the sub site when they don’t have any visibility feature dependency. 

4th

But when it comes to the portal created from the publishing portal definition where the publishing infrastructure is already stapled then the story is different. Here only the “Publishing Site with workflow” definition is selected to create the sub site by default. So you need to select the definition in this page which you want to be avail to create the sub site.

5th

Once you added the definition here then the selected templates will be available to create the sub site in the site creation page.

If you are creating custom site definitions to create the sub site then make sure that this setting is done so that they can get their site definition to create sub sites under collaboration portal / publishing portal collection using their custom site definition.

Comments

  • Anonymous
    May 27, 2009
    PingBack from http://www.anith.com/?p=42251

  • Anonymous
    June 22, 2010
    This information is valuable to the web people at UW-Stevens Point.  We want to have our top layer available for marketing type content, but we also want to allow for departmental collaboration and authenticated material to be available underneath. ... for those things, the Team site template is most useful, and by default, it wasnt available.  This information has been VERY helpful.