Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

1 Answer 1

up vote 2 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
add comment

Your Answer

 
discard

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.