Why Content Query Web Part (CQWP) doesn’t return all results.
I’ve seen several cases, when people use CQWP and surprises when it doesn’t return all items in standard mode and returns all necessary items in “edit” mode. I find this topic is not being documented enough anywhere.
So, CQWP ignores following items from your queried data:
- Items are checked-out
- Items are not published and not-approved
Those scenarios are “behaviour by design”, and I found such behaviour logical. User’s are working on their items, and work in progress – you shouldn’t show such items
Workaround: set “UseCache” property to “false”.
Cite from SharePoint team:
“You are only seeing your items in edit mode because the caching infrastructure of the CQWP does not cache checked-out items of individual users and we disable cache in edit mode. You can disable caching on your Web Part by setting the "UseCache" property to false”
So, my recommendation is to revise your approach to return published and checked-in stuff only.
Mirror: Why Content Query Web Part (CQWP) doesn’t return all results.