Sunday, May 27, 2007

SharePoint Designer Deployment Issues

Hi All,

Many of you may already noticed (the rest are in for a big surprise) that when creating team sites while using SharePoint Designer there are several issues that prevent saving the site as a template and creating sites from it.

When you are using a Data View Web Part (DVWP) or the Workflow Designer, your sites created from the template will show a generic error and will ask you to open and fix the problem using SharePoint Designer.

For example, if you are adding a list view web part and right click->convert it to xslt data view web part it will work fine. But if you used the "Data view" menu at the top -> insert data view and then connected it to a list/library - your DVWP will throw this error when saving it as a site template.

After much searches for a solution the WCM dev team came up with a solution that explained the reason for this problem.

Apparently when you are creating any list references (for example: lookup field, dvwp on a list, workflow etc) all list references are represented as the list's GUID.

When saving a site as a template the GUID is marked for replacement on all new sites created from this template. After creating a new site from that template all marked GUIDs are replaced with the new GUIDs of the new lists on the new site.

So - where is the problem? Apparently in very few cases the list GUID is stored as ListID=GUID, and not as it should be - ListID= {GUID}. When the GUID is not wrapped in {} the SharePoint replace mechanism does not recognize the list id and does not mark it for replace...

The fix for this is rather easy, after adding a WF or a DVWP all you have to do is to dive in the ASPX or XML and wrap all GUIDs with {}...

Believe it or not - this actually saves the day and things are starting to work!!!

There are talks of fixing it in service pack (SharePoint or Designer? don't know...) but for now this is the only way I know of.

Hope this helps you guys; it sure did take a lot of my time finding this solution so I'd thought I'd share...

No comments: