Small dumb mistake, interesting symptoms.
So I am working on modifying the style on a Content Query Web Part, following the excellent directions by Heather Solomon. The idea is to have a small graphic that was dynamically generated using the Calculated HTML Column in a SharePoint List surfaced to the main page in a CQWP.
I didn’t like the spacing between the graphic and the text in the output, so I made the mistake of adding an to the xsl. I mean, I am adding an img tag, and an a tag with an href attribute, so I should be able to add a nonbreaking space, right? As I said, dumb.
The interesting thing about it was the result. The page rendered fine (though I still didn’t get the space I was looking for). When I looked at the HTML source for the page, the space wasn’t there (naturally). When I tried to take the page into edit mode, though, I got the following error:
An unexpected error has occurred.
Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.
What’s more, anyone trying to edit any page in the site got the same error.
Naturally, there were no web parts that were causing the error – closing and deleting web parts from the web parts maintainance page did no good. Naturally, removing the “I-can’t-believe-I-tried-to-use-HTML-special-characters-in-xsl” code resolved the error.
Filed for future reference under “How to prevent anyone from editing pages with a single “.
Oh, yeah, and to get the space I wanted, I added a nested table with some cell padding, like I was supposed to. (UPDATE – Alternative solution option in the comments below!)