On my last SharePoint 2010 project (building a public-facing website) I saw that the event log was getting deluged with errors with an Event ID 5548 from the Web Content Management source in the Publishing task category. The detailed event message was:
Event ID 5548
A malformed reusable content HTML fragment was found: A placeholder was found within the HTML Content but there is no ID Section header at the beginning of the HTML.
Although the site was up and running and there was no noticeable impact on the end user, these events were disturbing. Perhaps they indicated something deeper was wrong with the structure of solution?
Deciding to dig into this a little deeper, I was able to trace what was triggering the event by using the brilliant ULS Viewer. By following the logs I was able to narrow down that this was occurring only on a specific page of the site and which elements seemed to be causing the problem.
The root cause turned out to be a couple of web parts added in rich text fields. (The web parts were a Content Query Web Part and a Summary Links Web Part – however I think this could have been caused by any web parts). The web parts were functioning as expected and displaying the correct content and so there was nothing** to necessarily indicate that they were causing me a problem. However by simply exporting/ deleting and then re-importing the web part the errors in the event log disappeared!
**That being said I have seen some pretty strange behaviour with web parts added to rich text fields. Unlike SharePoint 2007 web parts now no longer need be added explicitly to a predefined web part zone and can be added into a rich text field amongst regular rich text. This seems to work absolutely fine the majority of times but on a few occasions I’ve seen behaviour such as the web part chrome (border) and toolbar being displayed when not set to display, and in a worst case scenario the whole web part is greyed out in edit mode and it is impossible to edit the web part properties! In these cases I find it best to either delete the web part by jumping into the html view of the rich text field, or to restore an earlier version of the page before this occurred.