Page History Broken After Upgrading Confluence to 4.x Due to Page Approval Plugin
Symptoms
After upgrading Confluence from a pre-4.x version to 4.x, a stacktrace is thrown when trying to view historical page versions created prior to the upgrade.
The following appears on-screen and in the atlassian-confluence.log
:
java.lang.UnsupportedOperationException: The body of this ContentEntityObject ('Example Page Name') was 'BodyType:WIKI' but was expected to be 'BodyType:XHTML'
at com.atlassian.confluence.core.ContentEntityObject.getBodyContent(ContentEntityObject.java:201)
at com.atlassian.confluence.core.ContentEntityObject.getBodyAsString(ContentEntityObject.java:238)
at net.customware.confluence.plugin.pageapproval.PageApprovalSpaceViewPageAction.execute(PageApprovalSpaceViewPageAction.java:60)
Cause
This is due to the Page Approval Plugin.
Workaround
- Ensure that the Page Approval Plugin is up to date.
- Re-run the XHTML migration by following the instructions here
- If historical page versions still do not work, disable the Page Approval Plugin via the Universal Plugin Manager at Confluence Admin > Manage Add-ons, then re-run the migration again.
Last modified on Nov 2, 2018
Powered by Confluence and Scroll Viewport.