-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Component/s: Page - Content APIs
-
None
-
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
- Have a page with previous at least 1 previous version with it's body stored as WIKI in db.
- 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`