Get page versions v2 API with ADF body returns a 500 in some cases

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      Get page versions v2 API with ADF body returns a 500 in some cases.
      GET `wiki/api/v2/pages/<id>/versions?body-format=atlas_doc_format`.
      This will happen if the body of any of the versions being returned is stored in the `bodycontent` table as `WIKI` instead of `XHTML` i.e. `bodytypeid`=0 instead of `bodytypeid=2`.
      Unclear how this situation is possible, but we have seen it in Server->Cloud migrated tenants.

      Steps to Reproduce

      1. Have a page with previous at least 1 previous version with it's body stored as WIKI in db.
      2. Call GET `wiki/api/v2/pages/<id>/versions?body-format=atlas_doc_format`.

      Expected Results

      Returns the page versions along with ADF body

      Actual Results

      500 error

      Workaround

      Use v1 API
      GET `wiki/rest/api/content/<id>/version?expand=content.body.atlas_doc_format`

            Assignee:
            Aniruddha Kakade
            Reporter:
            Aniruddha Kakade
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: