Question

I have a page with a Content Query WP that retrieves and displays a series of items from a list (blog posts). I have edited ItemStyle.xsl for this list and created a brand new item style that I then selected in the WP settings (tool part).

Everything works as expected. All col admins, owners, members, ... see the items with my custom style when they visit the page.

Except for visitors.

when I visit the page as a visitor, the display rolls back to some sort of default display. However what puzzles me is that it doesn't seem to be the "default" display stored in my custom ItemStyle.xsl.

I have done the following tests :

  • When I completely empty ItemStyle.xsl, then the WP displays an error message (which shows that it relies on this file somehow)
  • But when I add the word FOOBAR in many, many places of my ItemStyle.xsl, then it appears nowhere in that mysterious "default" rendering.

What's going on? Why do I see this default display out of nowhere, and why does it seem to have no links with my ItemStyle.xsl?

Was it helpful?

Solution

  • Do you need to checkin and/or publish the ItemStyle.xsl file?
  • Are there any non-standard permissions on the Style Library?
  • Is the CQWP instance linking to a custom XSL file for ItemStyles?
  • Has anyone played with the permissions or membership of the Style Resource Readers group?

Just trying to rule out obvious things first

EDIT

I wanted to add that the XML properties of a CQWP contain "fallbacks" for various properties, including a "default" ItemStyle should it not find or be able to read the default or other custom-linked XSL file.

  • Download the Web Part XML (click the web part title menu, click Export, save as the suggested .wepbart file type and open in a plain text editor)

  • Make sure line 100, ItemXslLink is an empty element (which means SharePoint will look for the default file in Style Library/XSL Style Sheets)

Basically you should have added a CQWP to the page from the web part gallery, as opposed to modify one that could have been customised previously to link to other XSL files or contains its own XSL

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top