SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're getting this error on a SharePoint 2010 web site when inserting a content query web part (CQWP) that uses a custom XSL file:

The web part references an untrusted XSL file. Only XSL files contained in this site's Style Library may be referenced.

We did some content deployment from one server to this one and we're wondering if that could have broken something. What's strange is that the same CQWP appears elsewhere on the site without any issues; the only thing is that SharePoint won't let us add a new one that uses that file.

Any idea why it's throwing this error for a CQWP that works elsewhere on the site pointing to the same XSL file? Thanks.

share|improve this question
up vote 3 down vote accepted

This happens when path of your xsl used by CQWP for rendering items is referring the source site collection from which the content was migrated. You may want to open the webpart file and make sure you are using relative path so that it always refer to same site collection in which it is being used.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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