I'm using Confluence 6.13 Server (on premise, Windows 2012R2 + SQL Server).
I have created a new page "REST-Test-2019" and added some content. After that I updated the page contents using the REST API
PUT /rest/api/content/{contentId}
The JSON payload is
{"version": {"number": 2}, "title": "REST-Test-2019", "type": "page", "body": { "storage": { "value": "<p>My new content</p>", "representation": "storage" }}}
The exact URI is
http://myconfluenceinstance/rest/api/content/28737562?status=current
I get a response status code of 200 which means 'OK'.
After updating the page via REST API the page displays the new content correctly. However, if I start editing the page via webbrowser UI, I get a blank page - no content at all. The only method to restore the new page content is to click on the three dots at the bottom of the page and choosing the menu item 'Reset to last published version'. If I confirm the warning message I get the content which I set through the REST API call.
Any ideas?
Thanks,
Guido
Hello Guido and welcome to the Community!
You have a very solid understanding of the Confluence API and how to update pages. Your JSON payload is good and will update the page. There is a possible issue with your URL that is being used. When you make a call to a stated URL, for this example:
http://myconfluenceinstance/rest/api/content/28737562
The result will be the page is updated with the content and the draft is published.
However, when you make a call with this URL for example:
http://myconfluenceinstance/rest/api/content/28737562?status=current
Your content is not published and created in draft status. You will also notice using this URL will have the page display “unpublished changes” next to the breadcrumb menu.
I was unable to reproduce your edit page after REST API PUT issue you explained. Something I would like you to consider testing would be to use a different URL when updating Confluence. Can you please try a URL without the “?status=current” and let us know the results?
We look forward to your reply so we may resolve this issue together.
Regards,
Stephen Sifers
Hello Stephen,
I tested your suggested URL and still get an empty page when switching to "Edit" mode.
I've taken some screen shots from the database tables CONTENT and BODYCONTENT.
CONTENT table with newly created REST-Test-2019 page:
BODYCONTENT table:
After updating with URL http://myconfluenceinstance/rest/api/content/31588378 with JSON payload from above:
Do I also have to update the draft? The REST API documentation says: Updating a draft is not currently supported
Thanks for your ideas,
Guido
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again Guido,
We need to figure out why you're receiving a blank page when editing then. While it is coincidence, it may not be directly related to your API calls themselves. Please review and answer the following so we can work our way through this issue:
This should help us find where your blank edit issue is coming from. We look forward to hearing back so we may find a resolution to this issue.
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your efforts. The problem did not go away by using different browsers/user accounts or by clearing the cache. Finally, I switched into 'safe mode' to deactivate all plugins - and it worked. By manually deactivating all plugins and then reactivating one by one I found a 'K15t Scroll platform' plugin that caused the trouble. Since we currently don't need it, I deinstalled the plugin and now everything works.
Thanks again,
Guido
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Of course I saw this question after I posted mine. :) (https://community.atlassian.com/t5/Confluence-questions/Anyone-Else-s-Edit-Version-Differ-after-Updating-Confluence-page/qaq-p/984379)
But I think we're having a similar problem. I wonder if yours is also reverting to an older version in edit view (the very first version, or some other version when the page was blank). As you'll see in my post, it tends to revert to the same older version. I don't know if something happened with that version or what that makes it revert to that one.
In my case, the pages were created with the API as well as updated. I wonder if I manually created a page, then updated it with the API, if the edit view would be blank?
I'll need to check to see if we have the 'K15t Scroll platform' and if I can deactivate it, too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @WW,
Scroll Platform is bundled with these apps: Scroll Versions, Scroll Translations and Scroll Acrolinx Connector. If you still have any of these installed, don’t remove the Platform. Otherwise, these apps will be disabled and stop working.
If you don’t have any of the mentioned above apps in the UPM, it is recommended to also remove Scroll Platform.
Hope this information helps to know where Platform comes from.
Roman.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.