Page History Broken After Upgrading Confluence to 4.x Due to Page Approval Plugin

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

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

  1. Ensure that the Page Approval Plugin is up to date.

  2. Re-run the XHTML migration by following the instructions here

  3. 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.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.