The other day, I had this error when I tried to point a Content by Query Web Part (CQWP) to a list on a sub site. I clicked the + sign in the tree view to open a sub site so I could see its lists, but what I saw instead was:
“There was an error in the callback.”
Ah! Ok. That really helped clarify the issue.
Since I know my site collection structure, I decided to ignore the error and the browse button. Instead, I entered the path to the desired list manually in the field provided in the CQWP properties. Testing the CQWP I found that it works just fine. Lesson: You don’t need to browse to a list if you know its URL!!
But I wanted to get to the cause of the error. The problem apparently does not lie with actually accessing the sub site or the list by the CQWP itself, but instead with rendering the tree view to open the sub site and expose its lists.
The tree view triggered by the “Browse” button when selecting site or a sub-site reminded me of the view that is presented when looking at the “Manage Content and Structure” link in the Site Collection tools (Site Actions > Site Settings).
So I tried that as well.
Sure enough, the site could not be opened here either. After persisting a few times, I got the unloved screen informing me that “An unexpected error has occurred”, followed by a correlation ID. Now, I’m an end user. I’m not blessed with access to the server logs, and don’t know how to process that correlation ID. So I sent it off to our server team to find out more about it.
Meanwhile, searching the mighty InterWeb, I found suggestions that either a list in the site or the site itself may have become corrupt. The best solution I found was to delete the site and start from scratch.
Uhmm. No. I spent a week building the site, the lists, the content. There’s got to be a better way.
Then I tried this:
- One by one, I deleted every list in the sub-site, knowing that I could always restore them from the recycle bin.
- After each list deletion, I went back to the Site Collection and ran the “Manage Content and Structure” link again, testing if I still got the error.
- Three or four lists into the process I hit the problem piece, because after I deleted “ListX” , the error no longer showed in “Manage Content and Structure”. I could now use the tree view buttons just fine.
- I went back to the sub-site and restored each list from the recycle bin, leaving “ListX” until last.
- After each restore, I ran “Manage Content and Structure” in the Site Collection. Every time it behaved just fine. No errors.
- Finally, I dared restore “ListX” list from the recycle bin, too. Holding my breath and starting “Manage Content and Structure”.
- Exhale. It WORKS! The list no longer causes the error. I can open the tree view and drill down into the Content and Structure just fine.
Selecting the sub-site’s list as a source from the CQWP property panel now also works without error.
Whatever it was that caused the callback error (whatever that is), it simply healed itself with a delete/restore cycle of the lists involved.
I’m especially happy that this list now works, since its form has been customised with InfoPath. After the restore, the InfoPath list form still works as intended.
Now, that was easy, for a change.
This is generally caused by a site with unsupposed lists or libraries on it. I ran into it on a migrated fab 40 site. Once all the offending lists were removed the site worked fine.