Affects Version/s: 5.1, 8.4.5
Fix Version/s: None
Similiar to issue
XWIKI-8995 I've got problems accessing historical versions of a page. The current version displays fine.
Analysis (e.g. catalina.out) shows errors like
- ''Exception while reading version [xxx.x] for document id [x,x,x,x,x,x]"
- "Caused by: com.xpn.xwiki.XWikiException: Error number 2002 in 2: Error parsing xml"
- "Caused by: org.dom4j.DocumentException: Error on line 255 of document : Character reference "" is an invalid XML character. Nested exception: Character reference "" is an invalid XML character."
Analysis shows, that for some unknown reason an invalid character (, viewable on edit) has been entered (may be some cut and paste-error) and saved rendering this and all versions after it unable to properly display in history (regardless of difference or page-view).
Thus I file a bug as saving invalid contend should be disallowed. If the contend were to be allowed it should display properly in history, too.
I fixed the issue within the database with a statement like
update xwikircs set xwr_patch=replace(xwr_patch, "", "") where xwr_patch like '%%';