QueryOverride and WIKI posts

Sep 30, 2008 at 6:09 AM
I have this code working for most things... except for WIKI pages.

For WIKI pages I get the error "Unable to display this web part" when referencing any of the standard styles that should work in ItemStyle.xsl. On the same page I have a regular CQWP accessing the WIKI posts without any issue - so I know in theory it should work.

I've debugged the code... and found one odd thing when the query is returning Wiki Pages. The TITLE Column appears to be empty for each wiki post (it isn't if the item returned is a Blog post). I would guess that may not be entirely odd - as the WIKI pages title is actually constructed from the file name of the ASPX page anyway (which is returned in the FILEREF column)- so perhaps the CQWP knows how to handle that. However I tried setting this column to a value. The pages still do not display.

If I set the "ItemStyle" to show just the basic data (without any methods that return LinkURL) the items will display.

e.g. this is the itemstyle that displays the text
<xsl:template name="TitleWiki2" match="Row[@Style='TitleWiki2']" mode="itemstyle">
<xsl:value-of select="@Title" /><br/>
<xsl:value-of select="@WikiField" /><br/>

I can re-construct the HREF tags within the code... however... I reallty want this to work with the standard ItemStyle.xsl.

Any ideas on what might be happening? Has enyone else got this code working on Wiki Pages?

By the way... this is a great... GREAT example of how to extend the CQWP functionality. Thank you for creating this.

p.s. I listed this as an Issue - however I just noticed the note which says support is only provided in the discussion area... hence... here it is..again.  :-)