-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 7.19.1
-
Component/s: Core - Content REST APIs
-
None
-
1
-
Severity 3 - Minor
Issue Summary
When Confluence is upgraded from any lower version to 4.0 or newer versions, an upgrade task creates a new version of the page with XHTML storage format. More information can be found in the below documentation:
- Migration from Wiki Markup to XHTML-Based Storage Format
If you are upgrading to Confluence 4.0 or later from an older version (From Confluence 3.5.x or earlier) then as part of the upgrade an automatic migration of your content will take place. This is a non-destructive process. Your existing content is not overwritten. Instead, the migration process will create a new version of each wiki markup page. The new version will use the new XHTML-based storage format, so that you can edit the page in the Confluence rich text editor.
For the pages that are stored with Wiki Markup (saved when Confluence is on 3.5.x or earlier), Confluence can successfully handle them on the UI and display them successfully. ![]()
But when you want to reach the content of this version of the page, Confluence gives a system error.
This is reproducible on Data Center: yes
Steps to Reproduce
- Create a page and edit it a few times to create versions of it.
- In the database, find the record for version 1 of the above page in the BODYCONTENT table.
- Replace the body column with the below:
This is the home page for the Test space. - Replace the bodytypeid column to: 0
- Flush the Confluence cache.
- Request the body content of the page's version 1 by using the below REST API endpoint:
<confluence_baseURL>/rest/api/content/<contentid_of_page>?status=historical&version=1&expand=body.view
Please don't forget to replace <> with the pageID of the page that is created in step 1.
Expected Results
The result should return like the below:
Actual Results
The 'Internal Server Error' is sent as a response:
The below exception is thrown in the xxxxxxx.log file:
2022-10-13 16:26:03,129 ERROR [http-nio-48090-exec-9 url: /rest/api/content/20742192; user: admin] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error : -- url: /rest/api/content/20742192 | traceId: d689435839afefa9 | userName: admin com.atlassian.confluence.api.service.exceptions.ServiceException: java.lang.UnsupportedOperationException: Cannot convert from wiki to view [...] Caused by: java.lang.UnsupportedOperationException: Cannot convert from wiki to view at com.atlassian.confluence.api.impl.service.content.ContentBodyConversionManagerImpl.computeConvertedValue(ContentBodyConversionManagerImpl.java:200) [...]
Workaround
Currently, there is no known workaround for this behavior. A workaround will be added here when available