I have a Content Query Web Part that was giving me fits. My situation presented itself as a permissions problem (or though it seemed). Certain people (with higher/better permissions) could see the content. Some people saw the error message.

I tried several things, including make sure the Publishing feature was enabled and deactivating it, and reactivating, just in case it was corrupted.

What finally worked for me was looking inside the XSL Style Sheets folder for the site collection, which was inside the Style Library. I saw that the ItemStyle.xsl file was checked out. I ended up checking it in and publishing to a major version.

It was just that simple, but I had no idea at the beginning, based on the problem itself.