none
SharePoint 2010 - Save Site as Template - Webpart Connections broken

    Question

  • I am saving a pretty basic site with a couple report viewer webparts that are connected to a text filter to receive parameters.  The connections work fine.  When I save the site as a template and create a new site, the connections to the text filter is gone, I have to reconnect the webparts to the filter.

    I've tried creating the connections in SPD as well as the browser and neither one sticks after saving as a template and creating a new page.

    Is there a way to prevent these from breaking? Someway to hardcode the connection? The connection remains on the same page, I would think this should work.

    Also, I've noticed that when the new site is created from the template, the 'Target Audience' on the text filter webpart is blanked out.

    As always, any and all help is appreciated.  I'll manually fix these connections but I am hoping to either fix the connection in the template, or be presented with some powershell way to script the site creation and webpart reconnection.  Thanks!

    Friday, December 07, 2012 12:29 AM

Answers

  • Hi,

         When the site is created using the saved template, the web parts will be assigned a new id which result in the connected web part connection lost since the connection between the web part is identified by the web part id. It can only be retained using custom code, connecting the web part on the site provisioning.

    Thanks,

    Ajeet


    If my post is helpful - please click on the green arrow to mark it as answer

    Friday, December 07, 2012 9:27 AM

All replies

  • Hi,
    Unfortunately some things are not saved in template (e.g.: if list should be crawled) and then you need to fix it manually/from code after site creation. I assume that your issue jumps into this.


    pkozan

    Friday, December 07, 2012 7:33 AM
  • Hi,

         When the site is created using the saved template, the web parts will be assigned a new id which result in the connected web part connection lost since the connection between the web part is identified by the web part id. It can only be retained using custom code, connecting the web part on the site provisioning.

    Thanks,

    Ajeet


    If my post is helpful - please click on the green arrow to mark it as answer

    Friday, December 07, 2012 9:27 AM