From: Harold on
Hi,

we have a publishing website with multiple ContentByQueryWebParts. The
homepage for example contains eight ContentByQueryWebParts. When the
homepage is retrieved some of the ContentByQueryWebParts return no
results. When I refresh the page in the browser then after a while
these results appear. It looks like it has something to do with caching
or a timeout somewhere.

Is anyone experiencing the same problem?
Does anyone have a clue what could cause this behaviour?

Kind regards,
Harold

From: Harold on
Additional info:
We have enabled diagnosic logging and for the empty
ContentByQueryWebPart the following excpetion is logged:

CrossListQueryCache::GetSiteData() caught exception
(Microsoft.SharePoint.SPException: Exception occurred. (Exception from
HRESULT: 0x80020009 (DISP_E_EXCEPTION)) --->
System.Runtime.InteropServices.COMException (0x80020009): Exception
occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))
at
Microsoft.SharePoint.Library.SPRequestInternalClass.CrossListQuery(String
bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery,
ISP2DSafeArrayWriter pCallback, Object& pvarColumns) at
Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl,
String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery,
ISP2DSafeArrayWriter pCallback, Object& pvarColumns) --- End of
inner exception stack trace --- at
Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl,
String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery,
ISP2DSafeArrayWriter pCallback, Object& pvarColumns) at
Microsoft.SharePoint.SPWeb.GetSiteData(SPSiteDataQuery query) at
Microsoft.SharePoint.Publishing.CachedArea.GetCrossListQuery(SPSiteDataQuery
query, SPWeb currentContext) at
Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteData(CachedArea
cachedArea, SPWeb web, SPSiteDataQuery query)) for query:
'<ViewFields><FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"
Nullable="True" Type="Text"/><FieldRef
ID="{94f89715-e097-4e8b-ba79-ea02aa8b7adb}" Nullable="True"
Type="Lookup"/><FieldRef ID="{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}"
Nullable="True" Type="Counter"/><FieldRef
ID="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}" Nullable="True"
Type="DateTime"/><FieldRef ID="{1df5e554-ec7e-46a6-901d-d85a3881cb18}"
Nullable="True" Type="User"/><FieldRef
ID="{d31655d1-1d5b-4511-95a1-7a09e9b75bf2}" Nullable="True"
Type="User"/><FieldRef ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}"
Nullable="True" Type="DateTime"/><FieldRef Name="PublishingRollupImage"
Nullable="True" Type="Image"/><FieldRef Name="_Level" Nullable="True"
Type="Number"/><FieldRef Name="Comments" Nullable="True"
Type="Note"/><FieldRef Name="ArticleStartDate" Nullable="True"
Type="Date"/><FieldRef ID="{71316cea-40a0-49f3-8659-f0cefdbdbd4f}"
Nullable="True" Type="DateTime"/><FieldRef Name="ScopeId" /><FieldRef
Name="UniqueId" /><ListProperty Name="DraftVersionVisibility"
/></ViewFields><Lists
ServerTemplate="850"></Lists>True<RowLimit>12</RowLimit><Query><Where><And><Eq><FieldRef
Name="ContentType" Nullable="True" Type="Text"/><Value
Type="Text">Artikelpagina</Value></Eq><Geq><FieldRef
ID="{71316cea-40a0-49f3-8659-f0cefdbdbd4f}" Nullable="True"
Type="DateTime"/><Value
Type="DateTime"><Today/></Value></Geq></And></Where><OrderBy><FieldRef
ID="{71316cea-40a0-49f3-8659-f0cefdbdbd4f}" Nullable="True" Type=""
Ascending="TRUE"/></OrderBy></Query>' at url: /Actueel/Nieuws. Titel
webonderdeel: Agenda

From: Harold on
More info:

this problem only occurs when the webpart is directly in the
pagelayout. When we place a webpartzone in the pagelayout and the
ContentByQueryWebpart on the webpart zone then it works as expected.