SharePoint 2007 - Site Templates Issues

Argh. The first thing I want to say, is I hate the error messages in SharePoint. I always have, and I know everyone has blogged and talk about this, but nothing is more frustrating then

Cannot complete this action.

A Web Part or Web Form Control on this Page cannot be displayed or imported because it is not registered on this site as safe.

An unexpected error has occurred.

I mean, in a final product, have some generic error messages, so the user doesn't see crazy stuff, but at least in a beta, put a LITTLE more information.  I mean, of course, it is an unexpected error, if it was expected it could have been caught and said something else, or it would have work, so OF course it was unexpected.

Ok, done with my rant.

Site Templates-

In our SharePoint product, we use a lot of lookups, so we use site templates to create different types of jobs, and then a user can create the type of job that matches their needs. We build navigation, lists and a bunch of different configured web parts on these templates.

The first issue, when attempting to save a template SP 2007, you don't even have a link on a sub-site on the top site of collection.  Mark already blogged about that, and how to go to the url directly, or even build a feature that you can add to the options in the admin page.

The 2nd issue is, when creating a site from a template that was created on another site collection, we get errors all the time. The site is created, but there are issues with the navigation not being created on the parent site or the sub site.  No big deal, annoying but no big deal.

The 3rd bug or issue we have found, is when restoring a site template with a customized default.aspx page, or any customized page.  We customized (or unghosted which ever you want to call it) with SharePoint Designer (Frontpage), and when restoring it, the site gets created and the navigation is fine.  Except, you get this nice error when going to the site

An unexpected error occurred.

It wasn't hard to narrow down the problem, I figured out it was a customized page, and the absolute URL of the master page gets saved in the site template, and the master page can't be loaded.  You can fix the error, by either going in to SharePoint Designer and restore the page from the template page. 

The other work around, is to go into SharePoint designer and go into the code of the page, and just fix the 1st line of code on the default.aspx

<%@ Page language="C#" MasterPageFile="http://www.myoriginalsite.com/wheretemplatewas/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document" %>

to

<%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document" %>

Ok, well I will get back to cranking away on Beta 2, and I hope that the Technical Refresh will address some of these issues. I have looked at the Known Issues on the Microsoft beta site, but none of these are listed. I wish they posted the Known Issues so we could search the list and not spend time messing with it, if it is an issue and going to be fixed in the TR.

Just my 2 cents..

Morgan

kick it on SharePointKicks.com