Creating Site Templates from MOSS publishing sites - sharepoint

I know that creating a site template from a MOSS publishing site is not currently supported by Microsoft.
Can anyone tell me if creating a basic site, then turning on the publishing feature, then creating a site template is supported - I would guess not as it's probably the same as creating a publishing portal?

You can staple the publishing feature onto your site template.
From KB 986908:
You can create a stapling feature to staple the Office SharePoint Server Publishing feature to specific site templates. For example, see the Feature.xml file in the "Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Features\PublishingStapling" folder. To staple the Office SharePoint Server Publishing feature to all site templates, use the TemplateName="GLOBAL" property. This property staples a particular feature to a site definition if the site definition does not specify the AllowGlobalFeatureAssociations property. (Only the Shared Services Provider site template and the Blank Site site template use the AllowGlobalFeatureAssociations="FALSE" property.)
For example, when you use the TemplateName="GLOBAL" property to staple the Office SharePoint Server Publishing feature, a site that is based on the Team site template uses the system master page that is configured for the root site of the site collection.

you can still access the save template webpage, and save it...
for example http://localhost/website/_layouts/savetmpl.aspx
and it works like a charm :-)

I don't think what you're describing will work (like you said, it's basically the same thing as a Publishing Portal), but there appears to be a workaround. According to this post from the SharePoint Solutions Team (apparently not related to Microsoft), you can create a publishing site, customize it as needed, deactivate the publishing feature, create a site template from it, create a new site based on the template, and then activate the publishing feature on your new site.
It sounds like this works, but is not officially supported by Microsoft. Be careful, since it may mostly work, but I wouldn't be surprised if some small pieces of it break.

We wrote our own tooling to solve the export problem. We can create site columns, content types, master pages, page layouts etc in the Publishing site, and export selected items to a WSP package for deployment to other servers.
The tool SPSource takes a similar approach, but creates a Visual Studio solution for compilation. The result can be packaged with WSPBuilder.

Related

Not able to create site using site template - SharePoint 2013

I have created SharePoint Site, from which I created a site template, now I need to create similar sites under same site collection using the Site Template. In order to automate this functionality I created the Site Template and try to create new sites from this template using SharePoint Designer Workflow using web services. But while performing this am getting below error.
"The site template requires that the Feature {bf8b58f5-ebae-4a70-9848-622beaaf2043} be installed in the farm or site collection"
To troubleshoot this issue I tried to create the site using the same site template manually, which am able to perform successfully.
I found that above GUID {bf8b58f5-ebae-4a70-9848-622beaaf2043} refers to Power View feature, which I found activated in my site collection, But am not using any power view related functionality in my application.
I would be grateful, if anyone let me know how to resolve this issue.
It seems like the issue is with the template. That error is saying before you create the site template, enable that feature at the site level on the template site before saving the site as a template. I had a similar use case about a year ago to automate all our private team site creation. I found this article very useful.
https://sharepointryan.com/2013/09/10/create-a-sharepoint-site-spweb-using-rest-in-spd-2013-workflow/
In the dictionary for the json request, set WebTemplate to the template / solution ID from your site collection.
Hope it helps.

Site Template and Master pages

I am a .net developer and want to learn SharePoint. Usualy we use MasterPages to have a constant layout for all or some of the pages. My confusion here is SharePoint uses Site Template and MasterPages which both sounds to do same thing. am I right?
thanks
MasterPages and Site templates are absolutelly different thing. Master page is usually layout of some pages. It's same like in ASP.NET.
In Sharepoint you can create some sites in site collection. These sites are created according to site template. When you creating (for example) team site, it's created according to team site template, which is stored in Sharepoint folder on file system. In site templates you can specify which features should be activated when site is created, which features should be activated on site collection scope etc. Also you can specify list, which should be created, modules... And also you can specify default master page which will be used on site.
You can find more informations on msdn

Sharepoint 2007 - Custom webpart deployment doesn't work

I have a custom webpart for Sharepoint 2007. I am trying to deploy it to a new Sharepoint web application. I am using WSPBuilder with VS2010 to do the deploy. When I examine the wss\VirtualDirectories\ folder for the web app, the wpcatalog folder does not exist there. When I go to the Web Part Gallery and click "New" button, the web part is no there either. What could be causing this behavior? Are there any other ways to troubleshoot it?
Thanks.
the wpcatalog is actually a document library containing the .webpart definition files. It is stored in the content database, not the file system.
You need to verify the solution is in fact deployed to your web application, and then activate any features if necessary. You can verify the solution deployment under central administration\operations\solution management.

Enabling publishing infrastructure feature by default in sharepoint 2010?

I know how to in the settings activate publishing feature on a site but is it possible to have this by default when a new site is created from the UI?
I have some customized stylesheets and when a new team site is created it doesn't load these but instead looks like a sharepoint site out of the box. When I go to settings and activate publishing features the page reloads with the custom stylesheets. I wish to not have to do this every time a new site is created. Is there a solution to this?
Thanks in advance.
I guess you could either:
Build a site template (can't remember if these store feature activations)
Build a custom site definition, and activate the features you need
Build a stapling feature to tie your feature to the site definition

Get TFS URL in Portal Site

I have created a Team Project in TFS 2010 and the Project Portal in SharePoint 2010.
Now I need to create a WebPart to deploy in the SharePoint Site (Project portal) that connects to the TFS to get some information.
Where I can get the TFS Url that is associated with the Project Portal in SharePoint?
Any clues?
Thanks in advance.
The url of TFS is not stored in the Project Portal. It is the other way round. In TFS the WSS url is stored.
TfsRedirect can be used to determine the TFS Web Access URL from within SharePoint. Although it's not exactly what you want, and it's a little hacky - you can pass the parameter tf:Test=1 to get the TFS team project that is associated with the site that your web part is being displayed on.
See John Socha-Leialoha's blog post on Using TfsRedirect to Display Reports in TFS 2010 Dashboards
What is TfsRedirect?
Here’s the scenario. You had TFS create a dashboard site in SharePoint
when you created your team project (or you added it later as described
here). There are several items on this dashboard that point to other
locations that are potentially on other servers:
Team Web Access
Process Guidance
Reports shown on the dashboard pages
TFS itself know where to find these assets. And the locations can
change if, for example, the TFS administrator moves the reports to a
different server.
Rather than hard-code the locations of these assets into the
dashboard, the TFS team created a web page called TfsRedirect.aspx
that knows where these different assets are located, and will redirect
to that page.
Shouldn't you be able to go in to TFS2010 -> Team Explorer -> Right-Click on your Team Project -> Portal Settings?

Resources