I'm experiencing some very strange behavior with a content query web part.

The web part uses no customised XSL, and is a simple query of "All sites in this site collection, from a Document Library, using the Document content type or one of it's children" where the Modified By [_hidden] field is equal to [Me].

As one user, this works fine. The user sees all the documents they have modified.

As another user, the query returns no items.

Both users are definitely the Last Modified users for documents, both users are Site Collection Administrators and have further explicit permissions against the site just to be sure. The libraries inherit permissions as do the items. The libraries are standard Document Libraries.

I have attempted to point to a specific site or even a specific library using the web part, this has made no difference. I have also created a new page and put a second CQWP on just to make sure there was nothing wrong with that page. I have also tried flushing the Object Cache to ensure that this isn't causing any strange behavior, and setting UseCache to false in the web part properties.

Setting the filter to specifically reference the second user instead of [Me] does work correctly, as does entering their display name into the query string as ?username=display%20name and using a [PageQueryString: username] filter. Using their windows user account as a query string parameter instead of display name does not work.

I can see no errors in either the ULS or event logs on the farm servers.

Has anyone else experienced this or have any suggestions on what I could check next?

  • Just wondering... the missbehaving user - it's perhaps the system account for the site? There are many cases where the system account name/identity leads to problem in queries and such... could this be the case? – SPArchaeologist Jan 10 '12 at 13:13
  • No, the user in question was in fact a normal user, I then made him a site collection admin to see if that made it work for him, as it was working for my user which was already a site collection admin. – Chris Jan 10 '12 at 13:44
  • Solved it, I put the farm trace log in verbose and got a decent error message. Seems the query being used by the CQWP was exceeding the list view threshold in the web app's resource throttling settings. I'll have to reconsider how I'm going to do this, a CQWP might be the wrong approach. – Chris Jan 10 '12 at 14:13
  • 3
    Chris, since you figured it out by yourself.. would you mind posting the steps you took to determine the error? Then, you can accept your own answer for someone in the future. – Kit Menke Jan 10 '12 at 14:24
  • Glad you figured out, I had forgot that "optimal" behaviour "If i have too much results then why return any result at all"...O_o'. – SPArchaeologist Jan 10 '12 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.