Webpart Connections Problem for Site Templates – The ugly { }

When any site is modified by adding/removing/modifying the webpart  like DataView and later on site is saved with the “Save as Template” from Site Settings, re creating site using that template always displays broken webparts with errors like “Unable to Render this webpart” etc. this is because of ListID parameter with value as GUID of the List stored in that webpart from where it gets the data to display. whenever new site is created using template sharepoint regenerates the GUID for the Lists, this results in error for webpart,if it is still referring the old (Or origianal site’s ) List-GUID.  This can be taken as Sharepoint Designer Bug since it hardcodes the GUID’s.  If seen more carefully this hardcoded GUID’s are not in { }.
The ListId should be wrapped by squiggly brackets. (i.e. {1626053A-C681-4A06-8024-DACCFD424508})

When a site is saved as a template any sites provisioned from the template will replace the ListId with the new one from the newly generated site. This process doesnot applies to GUID’s without brackets -{ }

Another Solution to overcome this is to Open the site in any designer, Find the webpart and and change “ListID” with “ListName” and GUID with actual name of the list in  Select, Update, Delete, Insert parameters.

This also works, since internal ListNames are unique, and after creating the new site with the site template , it still points to list by its name – which is not changed.