Geeks With Blogs

News





The SharePoint Hillbilly Fewer Big Words... More Pretty Pictures...

Hi, I’m Mark and I’m a moron.  Every time I think I have a handle on how to do even the most simple things in SharePoint I find out I have to jump through hoops to get things to work just right.  I’m hoping someone out there reading this blog will leave a comment saying “Hey!  You’re a moron, here’s how you SHOULD have done it!”.  I won’t be offended, feel free to belittle me. I have no problems looking like an idiot if I’m learning something. 

Again, this is a very basic, step-by-step blog.  All you pro’s will find it boring, but please feel free to throw in your input.

What Happened This Time?

Now that we have three farms set up (Dev, Test, and Prod) I thought I’d create a really simple site with a SPD workflow in dev and then deploy it to Test and Prod so that we could check it off of our list of tests.  Sounds simple enough?  I’m sure you can do it without issue (In fact I HAVE done it before without issues on our old Single Server “Proof of Concept” farm). Well, I firmly believe if something is idiot proof they will create a better idiot.  Let me take you down my little odyssey that ended up taking up most of my afternoon.

Step 1:  I Created a Site

Don’t know how to create a site?  Two simple ways (simple is good).

Create site in SharePoint

  • From within SharePoint, click on that bright orange “Site Actions” button and then click “Create Site”:

clip_image002

  • Give your site a name and a Path, Select a Template and then click on the “Create” button (you can leave the rest of the fields their default values):

clip_image004

  • Your new site is now created.  You can customize from here however you’d like.

clip_image006

Create site in SharePoint Designer

  • Connect to SharePoint Site using SharePoint Designer using “File->Open Site”.

clip_image008

  • Click on “File->New->Web Site”.

clip_image010

  • Click on “SharePoint Templates”, Select a template, and type in the path for your new site. 

clip_image012

  • Your new site is now created and you can browse to it.  You will notice that this site will have different navigation than the site we created in SharePoint. You can modify the navigation to be the same by going to “Site Actions->Site Settings->Navigation”.   Again, at this point customize your size however you’d like to.

clip_image014

Step 2:  I Saved My Site as a Site Template

Okay, so far so good.  Now all you have to do after you customize your site is save you site as a template.  This is where I ran into my first “opportunity”.  Here are two ways to save your site as a template.

Save Site As Template in SharePoint

  • Good news if you created a top level site, all you have to do to create a template is go to “Site Actions->Site Settings” and click on “Save site as template” under the “Look and Feel” section.
  • Not-So good news: You will notice that if your site is NOT a top level site you do not have the link to “Save site as template” (I didn’t think it made much sense either).  After some quick searching I found that you can still save your site as a template by manually appending “_layouts/savetmpl.aspx” to your sub site’s url.  Thanks to The SharePoint Farmer's Almanac for that piece of information.  There is also a link in the aforementioned blog that will tell you how to get the “Save site as template” link into your Site Settings.  I’m STILL not THAT motivated though.

clip_image016

  • On the “Save site as template” screen, just fill in some identifying information about your template and click “Ok”.  Notice the check box “Include Content”.  It does just what it says (a rarity in SharePoint?).  If you click this check box, any list data you have in your current site will be carried over into the Site Template.

clip_image018

  • If you didn’t do anything wrong, and SharePoint is in a good mood you will be notified that your template was created successfully. Go ahead and click on the “site template gallery” link and we’ll save a local copy of our template to upload to our other farm.

clip_image020

  • Click on the name of your template, and you will be prompted to save it locally.  Go ahead, it’s okay.

clip_image022

Save Site As Template in SharePoint Designer

  • Open your site in SharePoint Designer

clip_image008[1]

  • Click on “File->Export->SharePoint Site Template”.  This will take you to the “Save Site as Template” page in SharePoint.  So, just follow the previous steps from there.

clip_image024

Step 3:  I ATTEMPT To Use My Saved Template

This is where the fun starts and I ran into a couple of more “opportunities”.  I’m sure this is documented very clearly somewhere, but one of my skills is NOT “reading directions thoroughly before jumping in”.   Here are the steps I ended up taking.

  • First I uploaded my saved template to my other SharePoint farm by going to “Site Actions->Site Settings”  and clicking on “site templates” under the “Galleries” section.

clip_image026

  • Click the “Upload” button, browse to your saved template and click “Ok”.

clip_image028
clip_image030

  • Now! If the planets align, SharePoint is in a good mood, and you click your heels together three times you are pretty much all done.  All you have to do is follow my steps above for creating a site, and when it comes to the step where you choose your site template click on the “Custom” tab.  You should see your uploaded template there.

clip_image032

Alas, this is NOT how things worked for me.  I followed all the steps above and when I got to the previous step I did not HAVE a tab labeled “Custom”.  Logic tells  me I didn’t have something installed that I should have.  This is where one of the pro’s need to leave feedback and say “All you had to do was add this update and you would be all set”.  Did I mention my aversion to reading directions completely?  I’m impatient!!!  So!  I took matters into my own hands and here is what I did to get that pesky custom tab to appear:

Step 3.1:  I installed ApplicationTemplatesCore.wsp

Apparently our farms did not have the Windows SharePoint Services 3.0 Application Template: Application Template Core installed.  So I though “aha! That’s why I don’t have the ‘custom’ tab.”

So, I clicked on the link above, downloaded the ApplicationTemplatesCore file and installed it as follows:

1) I saved and uncompressed ApplicationTemplateCore.wsp on my SharePoint server.

2)  From the command line, I browsed to the location of the wsp file and entered these commands to deploy the wsp file:

  • stsadm.exe -o addsolution -filename ApplicationTemplateCore.wsp
  • stsadm -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment -immediate
  • iisreset

I thought for sure I  had the problem solved and by installing this I would now have the option to use this elusive custom tab.  So, I go to create a new site, go to the list of templates and WHAT?!?!! still no freaking Custom tab!  At this point I was singing the praises of SharePoint and reflecting on how blessed I am to have this as my future.  Again, I’m sure some reading would have come in handy here, but no!  I’m just THAT stubborn.

Step 3.2: I installed one of the Fab 40 WSPs

“Okay, so.. what am I doing wrong here?” I wondered aloud as people came by my office to make sure I was not about to go postal.  So, I did a couple of quick google searches and didn’t find any relief.   I decided to go ahead and see what would happen if I installed one of the Fab 40 SharePoint templates.  I figured it couldn’t hurt and we should at least have these on our Dev server anyway.  Here is what I did:

1) Saved and uncompressed Windows SharePoint Services 3.0 Application Templates: All Templates to my SharePoint server.

2)  From the command line, I browsed to the location of the uncompressed files and entered these commands to deploy ONE of the wsp files:

  • stsadm.exe -o addsolution -filename <name of wsp file>.wsp
  • stsadm -o deploysolution -name <name of wsp file>.wsp -allowgacdeployment -immediate
  • iisreset

I wasn’t holding out much hope, but I thought I’d go and try to use my custom site template again.  And guess what??  When I went to create a site, the Custom tab was now available with my custom site template listed as an option!!  Now, wasn’t that easy?

Step 4:  I Successfully Create a Site Using My Template

If everything else is working properly, just follow the steps above and choose your custom site template as the template for your new site.  When I was doing this I created a site with a SPD workflow.  The SPD workflow was deployed without issue when I used the above steps to save the site as a template and redeploy it. 

Site migration in SharePoint is becoming more and more critical to our organization and SharePoint brings along a lot of its baggage making it even more of a challenge.  As I come across and hopefully conquer these challenges on more complicated applications I’ll be sure to let you know what happened and how we solved the problem.

Lastly, I’m fairly certain I should not have had to gone through the hoops listed above to use my custom site template.  If anyone out there knows what the problem was I would appreciate the feedback so I can address it properly in the future.

As always, thanks for stopping by and thanks for the feedback.

Posted on Monday, January 19, 2009 4:30 PM | Back to top


Comments on this post: A Complete Moron’s Guide to Deploying a Simple Site Across Farms Using a SharePoint Site Template (STP File)

# re: A Complete Moron’s Guide to Deploying a Simple Site Across Farms Using a SharePoint Site Template (STP File)
Requesting Gravatar...
Humm... interesting,

Very interesting and easy to follow steps, thanks for sharing...

Keep up the good work,

Anyway, thanks for the post
Left by software development on Oct 20, 2009 10:12 AM

# re: A Complete Moron’s Guide to Deploying a Simple Site Across Farms Using a SharePoint Site Template (STP File)
Requesting Gravatar...
Thanks for this piece of information, I enjoyed reading of your article greatly! Though it is sometimes not an easy task to find something worthy to read, I am always glad to come across something really interesting. Good luck and future success.
Left by rapid4me on Oct 28, 2009 9:15 AM

# re: A Complete Moron’s Guide to Deploying a Simple Site Across Farms Using a SharePoint Site Template (STP File)
Requesting Gravatar...
This is a great guide for a self proclaimed moron like myself,
Left by UK Software companies on Dec 14, 2009 10:05 AM

Your comment:
 (will show your gravatar)


Copyright © Mark Rackley | Powered by: GeeksWithBlogs.net