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?

1 Answer 1

  • 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


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

  • 1
    There were only standard permissions on Stylesheet library, but that library is known for sometimes behaving in a strange manner, permissions-wise. However that was not it. ItemStyle.xsl was indeed not published... After all this years I still get tricked by this! This time it was harder to spot because you cannot reach this file normally through the interface. Thanks! Commented Nov 27, 2018 at 12:12
  • My pleasure, glad to hear it is solved for you
    – Keegatron
    Commented Nov 29, 2018 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.