CQWP (Custom Styles) Not included in Save Site As Template

2012-11-19 Thread Nigel Witherdin

Hi All,
I have created a few CQWP custom styles, that are packaged as part of a 
solution where the XSL's are deployed to the site/Style Library/XSL Style 
Sheets/folder, and a modified .webpart file is deployed to the web part 
gallery referencing these styles. All this works great, and I now have a nice 
jQuery slider and a jQuery accordion.
However, when I add this web part to a page, and then save the site as template 
(including content), this customized CQWP is not created on the pages on the 
newly created site - even when the site is created within the same site 
colleciton (i.e. so there can be no doubt the web parts exist in the gallery 
with the expected IDs etc.).
I have exported the site template WSP to Studio and had a look at the 
SitePages elements.xml, and I can see the webpart is referenced correctly:
AllUsersWebPart WebPartOrder=2 WebPartZoneID=wpz 
ID=g_82de79b2_c4a3_4546_9d57_72ae552e3c1b![CDATA[webParts  webPart 
xmlns=http://schemas.microsoft.com/WebPart/v3;metaData  type 
name=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart, 
Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, 
PublicKeyToken=71e9bce111e9429c /  importErrorMessageCannot import this 
Web Part./importErrorMessage/metaDatadata  properties   
 property name=GroupBy type=stringProjectProperty.Title/property
property name=FilterValue2 type=stringCompleted/property
property name=BaseType type=string /property name=AllowConnect 
type=boolTrue/propertyproperty name=ShowUntargetedItems 
type=boolFalse/propertyproperty name=DisplayName type=string 
/property name=Title type=stringMy Tasks/property
property name=ContentTypeName type=string /property 
name=ViewFlag type=string0/propertyproperty 
name=MediaPlayerStyleSource type=string null=true /property 
name=AdditionalGroupAndSortFields type=string /property 
name=GroupByDirection 
type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+SortDirection,
 Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, 
PublicKeyToken=71e9bce111e9429cAsc/propertyproperty 
name=GroupByFieldType type=string /property 
name=FilterOperator1 
type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator,
 Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, 
PublicKeyToken=71e9bce111e9429cEq/propertyproperty 
name=FeedTitle type=string /property name=FilterOperator3 
type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator,
 Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, 
PublicKeyToken=71e9bce111e9429cEq/propertyproperty 
name=SortByDirection 
type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+SortDirection,
 Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, 
PublicKeyToken=71e9bce111e9429cAsc/propertyproperty 
name=FilterDisplayValue3 type=string /property 
name=FilterDisplayValue2 type=stringCompleted/propertyproperty 
name=FilterDisplayValue1 type=string[Me]/propertyproperty 
name=FilterValue3 type=string /property name=DataMappings 
type=stringDescription:{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Title,Text;|SipAddress:|Title:|OpenInNewWindow:|ImageUrl:|LinkUrl:|LinkToolTip:|/property
property name=ListGuid type=string /property 
name=ListUrl type=string null=true /property 
name=FilterValue1 type=string[Me]/propertyproperty 
name=CacheXslStorage type=boolTrue/propertyproperty 
name=MissingAssembly type=stringCannot import this Web Part./property
property name=ItemLimit type=int-1/propertyproperty 
name=DataMappingViewFields 
type=string{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Text;/property
property name=XslLink type=string null=true /property 
name=DataColumnRenames type=string /property name=AllowMinimize 
type=boolTrue/propertyproperty name=ContentTypeBeginsWithId 
type=string0x0108/propertyproperty name=ListDisplayName 
type=string null=true /property name=ListsOverride 
type=string /property name=ItemXslLink type=string/mkt/Style 
Library/Xsl Style Sheets/Accordion/ItemStyle.xsl/propertyproperty 
name=Height type=string /property name=SortBy 
type=string{8c06beca-0777-48f7-91c7-6da68bc07b69}/property
property name=CatalogIconImageUrl type=string /property 
name=Default type=string /property name=FilterType1 
type=stringUser/propertyproperty name=FireInitialRow 
type=boolTrue/propertyproperty name=AsyncRefresh 
type=boolFalse/propertyproperty name=ItemStyle 
type=stringAccordionCreateLinkToItem/propertyproperty 
name=AdditionalFilterFields type=string /property name=WebUrl 

Re: CQWP (Custom Styles) Not included in Save Site As Template

2012-11-19 Thread Web Admin
Have you opened the page in web part maintenance view to see if it's
present at all?


On 20 November 2012 10:31, Nigel Witherdin nigel_wither...@hotmail.comwrote:

  Hi All,

 I have created a few CQWP custom styles, that are packaged as part of a
 solution where the XSL's are deployed to the site/Style Library/XSL Style
 Sheets/folder, and a modified .webpart file is deployed to the web part
 gallery referencing these styles. All this works great, and I now have a
 nice jQuery slider and a jQuery accordion.

 However, when I add this web part to a page, and then save the site as
 template (including content), this customized CQWP is not created on the
 pages on the newly created site - even when the site is created within the
 same site colleciton (i.e. so there can be no doubt the web parts exist in
 the gallery with the expected IDs etc.).

 I have exported the site template WSP to Studio and had a look at the
 SitePages elements.xml, and I can see the webpart is referenced correctly:

 AllUsersWebPart WebPartOrder=2 WebPartZoneID=wpz
 ID=g_82de79b2_c4a3_4546_9d57_72ae552e3c1b![CDATA[webParts
   webPart xmlns=http://schemas.microsoft.com/WebPart/v3;
 metaData
   type
 name=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart,
 Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral,
 PublicKeyToken=71e9bce111e9429c /
   importErrorMessageCannot import this Web Part./importErrorMessage
 /metaData
 data
   properties
 property name=GroupBy
 type=stringProjectProperty.Title/property
 property name=FilterValue2 type=stringCompleted/property
 property name=BaseType type=string /
 property name=AllowConnect type=boolTrue/property
 property name=ShowUntargetedItems type=boolFalse/property
 property name=DisplayName type=string /
 property name=Title type=stringMy Tasks/property
 property name=ContentTypeName type=string /
 property name=ViewFlag type=string0/property
 property name=MediaPlayerStyleSource type=string null=true
 /
 property name=AdditionalGroupAndSortFields type=string /
 property name=GroupByDirection
 type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+SortDirection,
 Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral,
 PublicKeyToken=71e9bce111e9429cAsc/property
 property name=GroupByFieldType type=string /
 property name=FilterOperator1
 type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator,
 Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral,
 PublicKeyToken=71e9bce111e9429cEq/property
 property name=FeedTitle type=string /
 property name=FilterOperator3
 type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator,
 Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral,
 PublicKeyToken=71e9bce111e9429cEq/property
 property name=SortByDirection
 type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+SortDirection,
 Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral,
 PublicKeyToken=71e9bce111e9429cAsc/property
 property name=FilterDisplayValue3 type=string /
 property name=FilterDisplayValue2
 type=stringCompleted/property
 property name=FilterDisplayValue1 type=string[Me]/property
 property name=FilterValue3 type=string /
 property name=DataMappings
 type=stringDescription:{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Title,Text;|SipAddress:|Title:|OpenInNewWindow:|ImageUrl:|LinkUrl:|LinkToolTip:|/property
 property name=ListGuid type=string /
 property name=ListUrl type=string null=true /
 property name=FilterValue1 type=string[Me]/property
 property name=CacheXslStorage type=boolTrue/property
 property name=MissingAssembly type=stringCannot import this
 Web Part./property
 property name=ItemLimit type=int-1/property
 property name=DataMappingViewFields
 type=string{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Text;/property
 property name=XslLink type=string null=true /
 property name=DataColumnRenames type=string /
 property name=AllowMinimize type=boolTrue/property
 property name=ContentTypeBeginsWithId
 type=string0x0108/property
 property name=ListDisplayName type=string null=true /
 property name=ListsOverride type=string /
 property name=ItemXslLink type=string/mkt/Style Library/Xsl
 Style Sheets/Accordion/ItemStyle.xsl/property
 property name=Height type=string /
 property name=SortBy
 type=string{8c06beca-0777-48f7-91c7-6da68bc07b69}/property
 property name=CatalogIconImageUrl type=string /
 property name=Default type=string /
 property name=FilterType1 type=stringUser/property
 property name=FireInitialRow type=boolTrue/property