1

I have created my custom site, which contains custom WebTemplate, Master Page and Page. However, I don't have any SharePoint webparts to select. When I check my Web Part Gallery it's empty.

"There are no Web Parts to show in the "Web Part Gallery". To add a Web Part, click "Upload"."

What is right way add all SharePoint webpart to my solution? How I can add example "Silverlight Web Part" to my solution? Thank you! =)

My WebTemplate Elements.XML

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<WebTemplate Name="DEMO"
BaseTemplateID="1"
BaseTemplateName="STS"
BaseConfigurationID="0"
Title="DEMO SITE"
Description="DEMO - SharePoint Foundation 2013"
DisplayCategory="DEMO"
Subweb="FALSE">
</WebTemplate>
</Elements>

ONet.xml

<Project Title="DEMO - SharePoint Foundation 2013" Revision="0" EnableMinimalDownload="TRUE" SiteLogoUrl="" SiteLogoDescription="" xmlns="http://schemas.microsoft.com/sharepoint/">
  <NavBars>
    <NavBar Name="SharePoint Top Navigation Bar" Url="" ID="1002">
      <NavBarPage Name="Home" Url="" />
    </NavBar>
    <NavBar Name="Home" Url="/sites/DEMO" ID="1031" />
    <NavBar Name="Documents" Url="Shared Documents/Forms/AllItems.aspx" />
    <NavBar Name="Site Contents" Url="_layouts/15/viewlsts.aspx" ID="1034" />
  </NavBars>
  <Configurations>
    <Configuration ID="0" Name="DEMOMaster" MasterUrl="_catalogs/masterpage/DEMOMaster.master">
      <SiteFeatures>
        <!--CTypes Feature-->
        <Feature ID="{695b6570-a48b-4a8e-8ea5-26ea7fc1d162}" Name="FeatureDefinition/15/695b6570-a48b-4a8e-8ea5-26ea7fc1d162" SourceVersion="15.0.6.0" />
        <!--ShareWithEveryone Feature-->
        <Feature ID="{10f73b29-5779-46b3-85a8-4817a6e9a6c2}" Name="FeatureDefinition/15/10f73b29-5779-46b3-85a8-4817a6e9a6c2" SourceVersion="15.0.0.0" />
        <!--Fields Feature-->
        <Feature ID="{ca7bd552-10b1-4563-85b9-5ed1d39c962a}" Name="FeatureDefinition/15/ca7bd552-10b1-4563-85b9-5ed1d39c962a" SourceVersion="15.0.12.0" />
        <!--PowerView Feature-->
        <Feature ID="{bf8b58f5-ebae-4a70-9848-622beaaf2043}" Name="FeatureDefinition/15/bf8b58f5-ebae-4a70-9848-622beaaf2043" SourceVersion="15.0.0.0" />
        <!--ReportServer Feature-->
        <Feature ID="{e8389ec7-70fd-4179-a1c4-6fcb4342d7a0}" Name="FeatureDefinition/15/e8389ec7-70fd-4179-a1c4-6fcb4342d7a0" SourceVersion="15.0.0.0" />
        <!--IssueTrackingWorkflow Feature-->
        <Feature ID="{fde5d850-671e-4143-950a-87b473922dc7}" Name="FeatureDefinition/15/fde5d850-671e-4143-950a-87b473922dc7" SourceVersion="12.0.0.0" />
        <!--SearchWebParts Feature-->
        <Feature ID="{eaf6a128-0482-4f71-9a2f-b1c650680e77}" Name="FeatureDefinition/15/eaf6a128-0482-4f71-9a2f-b1c650680e77" SourceVersion="15.0.0.34" />
        <!--BasicWebParts Feature-->
        <Feature ID="{00bfea71-1c5e-4a24-b310-ba51c3eb7a57}" Name="FeatureDefinition/15/00bfea71-1c5e-4a24-b310-ba51c3eb7a57" SourceVersion="15.0.4.0" />

    <!--My Demo SiteFeatures-->
    <!--MasterPages Feature-->
    <Feature ID="f94eef29-5a6c-4aca-8513-83a38065d5ad"/>
    <!--StyleLibrary Feature-->
    <Feature ID="e19f9984-74d7-4689-9e85-e920a857fefe"/>

  </SiteFeatures>
  <WebFeatures>
    <!--WikiPageHomePage Feature-->
    <Feature ID="{00bfea71-d8fe-4fec-8dad-01c19a6e4053}" Name="FeatureDefinition/15/00bfea71-d8fe-4fec-8dad-01c19a6e4053" SourceVersion="1.0.1.0">
      <Properties>
        <Property Key="OldWelcomePage" Value="" />
      </Properties>
    </Feature>
    <!--WebPageLibrary Feature-->
    <Feature ID="{00bfea71-c796-4402-9f2f-0eb9a6e71b18}" Name="FeatureDefinition/15/00bfea71-c796-4402-9f2f-0eb9a6e71b18" SourceVersion="1.0.0.0" />
    <!--IssuesList Feature-->
    <Feature ID="{00bfea71-5932-4f9c-ad71-1557e5751100}" Name="FeatureDefinition/15/00bfea71-5932-4f9c-ad71-1557e5751100" SourceVersion="0.0.0.0" />
    <!--WorkflowHistoryList Feature-->
    <Feature ID="{00bfea71-4ea5-48d4-a4ad-305cf7030140}" Name="FeatureDefinition/15/00bfea71-4ea5-48d4-a4ad-305cf7030140" SourceVersion="0.0.0.0" />
    <!--MBrowserRedirect Feature-->
    <Feature ID="{d95c97f3-e528-4da2-ae9f-32b3535fbb59}" Name="FeatureDefinition/15/d95c97f3-e528-4da2-ae9f-32b3535fbb59" SourceVersion="15.0.0.0" />
    <!--PromotedLinksList Feature-->
    <Feature ID="{192efa95-e50c-475e-87ab-361cede5dd7f}" Name="FeatureDefinition/15/192efa95-e50c-475e-87ab-361cede5dd7f" SourceVersion="15.0.0.0" />
    <!--NoCodeWorkflowLibrary Feature-->
    <Feature ID="{00bfea71-f600-43f6-a895-40c0de7b0117}" Name="FeatureDefinition/15/00bfea71-f600-43f6-a895-40c0de7b0117" SourceVersion="0.0.0.0" />
    <!--SurveysList Feature-->
    <Feature ID="{00bfea71-eb8a-40b1-80c7-506be7590102}" Name="FeatureDefinition/15/00bfea71-eb8a-40b1-80c7-506be7590102" SourceVersion="1.0.0.0" />
    <!--GridList Feature-->
    <Feature ID="{00bfea71-3a1d-41d3-a0ee-651d11570120}" Name="FeatureDefinition/15/00bfea71-3a1d-41d3-a0ee-651d11570120" SourceVersion="1.0.0.0" />
    <!--GanttTasksList Feature-->
    <Feature ID="{00bfea71-513d-4ca0-96c2-6a47775c0119}" Name="FeatureDefinition/15/00bfea71-513d-4ca0-96c2-6a47775c0119" SourceVersion="0.0.0.0" />
    <!--LinksList Feature-->
    <Feature ID="{00bfea71-2062-426c-90bf-714c59600103}" Name="FeatureDefinition/15/00bfea71-2062-426c-90bf-714c59600103" SourceVersion="1.0.0.0" />
    <!--MobilityRedirect Feature-->
    <Feature ID="{f41cc668-37e5-4743-b4a8-74d1db3fd8a4}" Name="FeatureDefinition/15/f41cc668-37e5-4743-b4a8-74d1db3fd8a4" SourceVersion="1.0.0.0" />
    <!--workflowProcessList Feature-->
    <Feature ID="{00bfea71-2d77-4a75-9fca-76516689e21a}" Name="FeatureDefinition/15/00bfea71-2d77-4a75-9fca-76516689e21a" SourceVersion="1.0.0.0" />
    <!--TasksList Feature-->
    <Feature ID="{00bfea71-a83e-497e-9ba0-7a5c597d0107}" Name="FeatureDefinition/15/00bfea71-a83e-497e-9ba0-7a5c597d0107" SourceVersion="1.0.0.0" />
    <!--TeamCollab Feature-->
    <Feature ID="{00bfea71-4ea5-48d4-a4ad-7ea5c011abe5}" Name="FeatureDefinition/15/00bfea71-4ea5-48d4-a4ad-7ea5c011abe5" SourceVersion="15.0.1.0" />
    <!--HierarchyTasksList Feature-->
    <Feature ID="{f9ce21f8-f437-4f7e-8bc6-946378c850f0}" Name="FeatureDefinition/15/f9ce21f8-f437-4f7e-8bc6-946378c850f0" SourceVersion="1.0.20.0" />
    <!--MDSFeature Feature-->
    <Feature ID="{87294c72-f260-42f3-a41b-981a2ffce37a}" Name="FeatureDefinition/15/87294c72-f260-42f3-a41b-981a2ffce37a" SourceVersion="1.0.0.0" />
    <!--AnnouncementsList Feature-->
    <Feature ID="{00bfea71-d1ce-42de-9c63-a44004ce0104}" Name="FeatureDefinition/15/00bfea71-d1ce-42de-9c63-a44004ce0104" SourceVersion="1.0.0.0" />
    <!--PictureLibrary Feature-->
    <Feature ID="{00bfea71-52d4-45b3-b544-b1c71b620109}" Name="FeatureDefinition/15/00bfea71-52d4-45b3-b544-b1c71b620109" SourceVersion="2.0.0.0" />
    <!--GettingStarted Feature-->
    <Feature ID="{4aec7207-0d02-4f4f-aa07-b370199cd0c7}" Name="FeatureDefinition/15/4aec7207-0d02-4f4f-aa07-b370199cd0c7" SourceVersion="1.0.2.0" />
    <!--ContactsList Feature-->
    <Feature ID="{00bfea71-7e6d-4186-9ba8-c047ac750105}" Name="FeatureDefinition/15/00bfea71-7e6d-4186-9ba8-c047ac750105" SourceVersion="1.0.0.0" />
    <!--CustomList Feature-->
    <Feature ID="{00bfea71-de22-43b2-a848-c05709900100}" Name="FeatureDefinition/15/00bfea71-de22-43b2-a848-c05709900100" SourceVersion="1.0.0.0" />
    <!--DocumentLibrary Feature-->
    <Feature ID="{00bfea71-e717-4e80-aa17-d0c71b360101}" Name="FeatureDefinition/15/00bfea71-e717-4e80-aa17-d0c71b360101" SourceVersion="1.0.0.0" />
    <!--DiscussionsList Feature-->
    <Feature ID="{00bfea71-6a49-43fa-b535-d15c05500108}" Name="FeatureDefinition/15/00bfea71-6a49-43fa-b535-d15c05500108" SourceVersion="15.0.7.0" />
    <!--DataSourceLibrary Feature-->
    <Feature ID="{00bfea71-f381-423d-b9d1-da7a54c50110}" Name="FeatureDefinition/15/00bfea71-f381-423d-b9d1-da7a54c50110" SourceVersion="0.0.0.0" />
    <!--ExternalList Feature-->
    <Feature ID="{00bfea71-9549-43f8-b978-e47e54a10600}" Name="FeatureDefinition/15/00bfea71-9549-43f8-b978-e47e54a10600" SourceVersion="1.0.0.0" />
    <!--EventsList Feature-->
    <Feature ID="{00bfea71-ec85-4903-972d-ebe475780106}" Name="FeatureDefinition/15/00bfea71-ec85-4903-972d-ebe475780106" SourceVersion="3.0.0.0" />
    <!--XmlFormLibrary Feature-->
    <Feature ID="{00bfea71-1e1d-4562-b56a-f05371bb0115}" Name="FeatureDefinition/15/00bfea71-1e1d-4562-b56a-f05371bb0115" SourceVersion="0.0.0.0" />

    <!--My Demo WebFeatures-->
    <!--DefaultPage-->
    <Feature ID="3ca47727-6f59-4d24-9db4-46542a56043b"/>
  </WebFeatures>
</Configuration>

3
  • 1
    Take a look at what features SharePoint activates in respective site definition in the hive. You will find the XML there and can see exactly what to activate. Commented Jan 10, 2014 at 6:43
  • Can you explain/tell me more please? What file?
    – user20968
    Commented Jan 10, 2014 at 10:19
  • Take a look in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\SiteTemplates (for 2013, replace 15 with 14 for 2010). There you will, in the folders, find onet.xml for respective type. You will find feature elements like in MzMazzotti's answer below Commented Jan 10, 2014 at 14:04

2 Answers 2

1

I managed to solve the problem in part.

I made other solution and I added ONet.xml:

<Feature ID="00BFEA71-1C5E-4A24-B310-BA51C3EB7A57" /> 

and webpart are showing now. I don't understand what was problem but it's working now.

Thanks for the help! =)

0

In your WebTemplate onet.xml file, you should see a list of Site and Web features that get activated when a site is created from your template.

For example, in a webTemplate based on a STS#0 (team site) template, under the SiteFeatures node, you should see

<!-- BasicWebParts Feature -->
    <Feature ID="00BFEA71-1C5E-4A24-B310-BA51C3EB7A57" />

and under the WebFeatures node

<!-- TeamCollab Feature -->
    <Feature ID="00BFEA71-4EA5-48D4-A4AD-7EA5C011ABE5" />

You can obviously activate other features as needed.

For a list of all the OOB features ID, have a look here

5
  • Odd, I rip off team site and checked what Features it have and I add those features my solution. However, there is no web parts in my gallery. I checked all web parts related features but no luck. I even try to add features, like team site have them: <Feature ID="{00bfea71-1c5e-4a24-b310-ba51c3eb7a57}" Name="FeatureDefinition/15/00bfea71-1c5e-4a24-b310-ba51c3eb7a57" SourceVersion="15.0.4.0" />. More ideas?
    – user20968
    Commented Jan 11, 2014 at 5:41
  • The Feature ID in your example is a Site scoped feature. Take note that if you are creating a sub-site from your web template as opposed to creating a new root site in a site collection, then the features listed under SiteFeatures node don't get activated automatically.
    – MdMazzotti
    Commented Jan 11, 2014 at 11:57
  • Another thing that comes to my mind is to check the BaseTemplateName, BaseTemplateID and BaseConfigurationID properties in your Elements.xml file. (paste it here if you can, so that we can have a look at it)
    – MdMazzotti
    Commented Jan 11, 2014 at 12:06
  • @user20968 I don't see anything wrong in your Elements.xml file. Can you past here the onet.xml code?
    – MdMazzotti
    Commented Jan 13, 2014 at 10:42
  • I took copy of team site features.
    – user20968
    Commented Jan 13, 2014 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.