Skip to content

Author: John White

Exporting a Publishing site from SharePoint 2010 Enterprise and Importing Into Standard

I do a lot of development/configuration on my local SharePoint farm for all sorts of reasons. When  the content is ready I rely heavily on the stsadm.exe export and import commands to move content. However, this doesn’t always go as smoothly as planned. Usually site features that exist on the source, but not at the destination is the problem. When importing, you will receive an error indicating that a particular feature can’t be found.

Normally this is because of custom or third party solutions/features, but can also be an issue with out of the box deployments moving content from an Enterprise edition to a standard edition (but not the other way around).

There is some guidance for dealing with this out there for SharePoint 2007 but not much for 2010. Having recently gone through this in a trial and error fashion, I thought that I would share what worked. Essentially, you need to remove the offending feature before you do the export, deactivating doesn’t always suffice. My case below is for a publishing site, and your mileage will vary depending on the site template that you are using. First, the offending features are uninstalled:

stsadm -o uninstallfeature -force -name WACustomReports
stsadm -o uninstallfeature -force -name BizAppsListTemplates
stsadm -o uninstallfeature -force -name IPFSSiteFeatures
stsadm -o uninstallfeature -force -name ReportListTemplate
stsadm -o uninstallfeature -force -name DataConnectionLibrary
stsadm -o uninstallfeature -force -name PremiumSite
stsadm -o uninstallfeature -force -name PremiumWeb

Then the site is exported:

stsadm –o export –url http://mysiteaddress –filename myexportfile

Once done, the export file can be imported. However, don’t forget to reinstall those features – the previous step uninstalled them from all application (read – use with caution)

stsadm -o installfeature -force -name WACustomReports
stsadm -o installfeature -force -name BizAppsListTemplates
stsadm -o installfeature -force -name IPFSSiteFeatures
stsadm -o installfeature -force -name ReportListTemplate
stsadm -o installfeature -force -name DataConnectionLibrary
stsadm -o installfeature -force -name PremiumSite
stsadm -o installfeature -force -name PremiumWeb

Your mileage may vary depending on what you have in your farm,but all you need to do is to add to the commands above with the features in question.

3 Comments

Editing Page Layouts in SharePoint Designer 2010 – Edit in Advanced Mode

SharePoint designer 2010 has changed quite a bit from its predecessor – certainly on the UI side. In other ways it has remained the same (its occasional inability to tell whether or not a file is checked out is still very annoyingly persistent). One of the major changes was how it handles .aspx page editing.

Previously SPD2007 had the concept of advanced editing, and a more locked down standard editing environment. This was controlled BY aven’t been able to find an application option to change the behaviour of the “Edit file” link on the information screen. If you’re working on a web site, the advanced mode results in an awful lot of extra clicking, and an awful lot of cursing after being presented with yellow highlights.

If there’s something that I’m missing here, please feel free to fill me in!

7 Comments

Flight of the Honeybee

I think I’m starting to get the hang of this. I managed to snap this little guy while out amongst the raspberries. Flickr has all of the shots if you’re interested further.

IMG_5325

1 Comment

spSecurityTrimmedControl – An Indispensible Tool for your public facing SharePoint web site (and others)

At one point or another, if you design or modify SharePoint sites, particularly public facing web sites, you’ll have a need to show some design elements to some people, and not to others. SharePoint itself does a very good job of security trimming most elements based on your security level, but there are some cases where it just isn’t designed to do what you want it to do.

Take a public facing SharePoint site for  example. Designers need to be able to work with pages, and have access to all of the tools, the ribbon, etc. You of course don’t want public users to see any of these things.

Sharepoint Page with standard editing controls

If you log in as an anonymous user, SharePoint knows that you’re not an editor, so it trims out all of the editing controls.

image

The trouble is, not all of the controls that I want to hide from the anonymous user are trimmed. In this case,the navigation breadcrumb on the left,and the login control on the right. In fact, in may cases, the entire blue bar at the top will need to be hidden from the anonymous user.

As an aside, the sign in control is interesting. This is the same control that you see in the first image that gives the logged in user access to their profile, my site, etc. It turns into a login control for anonymous users, which is great when you have both public and secure areas of your site. The trouble is, that control shows up whether or not it’s even possible to log in. As part of locking down a public facing SharePoint site, I always extend the application into an internet zone, turn on anonymous access, and disable both basic and Integrated authentication.

Turn off all authentication for a SharePoint site

In this case, clicking on the login control simply results in an error. It would be nice if SharePoint could detect that authentication wasn’t even possible, and hide the control completely. Of course I digress, but this brings us back to the main point – how do we hide the offending elements from those with low or no privileges? It turns out that it’s actually pretty simple – we use the spSecurityTrimmedControl.

This control is simply a container that will either show or hide it’s contents based on a users security level. Simply edit the master page that the site uses (or better yet, create a new one based on your current one and then tell the site to use it). Below is an example of using the control to hide a link to the current site page when the user is not an editor.

Using SecurityTrimmedControl to hide a link button

The important attribute of the control is the permissions attribute. It basically acts as a switch, so if you have at least the permission listed, you will see the control. A complete list of the allowable values can be found here on MSDN.

Exercise caution however when hiding the ribbon. Don’t hide the ribbon’s container, because it needs to be seen in order to calculate page positioning, instead, hide only the contents of the container.  You can hide ContentPlaceHolders quite successfully though, because the server can still see them.

Use of this control is by no means limited to public facing web sites, but it is particularly handy for them. In fact, when requested, I use this control to hide the “View All Site Content” and “Recycle Bin” links in team sites.

3 Comments

Garden Life

My son Ian and I came across a clutch of newly emerged spiders in the garden this evening. My camera is pretty basic, but I did manage to get this shot.

New Spiders

1 Comment