Empty page when editing the page after using PUT /rest/api/content/{contentId}
Asked by G.M. K.:

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


Answers:
author: Stephen Sifers
body: 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

comments: author: G.M. K.
body: 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:

![CONTENT_1.png](https://community.atlassian.com/t5/image/serverpage/image-id/42345i575CED84E8977A5B/image-dimensions/1611x50?v=v2 "CONTENT_1.png")

BODYCONTENT table:

![BODYCONTENT_1.png](https://community.atlassian.com/t5/image/serverpage/image-id/42346iF0D09E15E6405450/image-size/large?v=v2&px=999 "BODYCONTENT_1.png")

After updating with URL http://myconfluenceinstance/rest/api/content/31588378 with JSON payload from above:

![CONTENT_2.png](https://community.atlassian.com/t5/image/serverpage/image-id/42348i57E8494EC146B78D/image-dimensions/1584x65?v=v2 "CONTENT_2.png")

![BODYCONTENT_2.png](https://community.atlassian.com/t5/image/serverpage/image-id/42347i0050DC06749EE420/image-size/large?v=v2&px=999 "BODYCONTENT_2.png")

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


author: Stephen Sifers
body: 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:

1. Can anyone edit the pages you've created?
2. Have you attempted a hard refresh in the browser to edit the page?
   1. CTRL/Control + F5
3. Which browsers have you tried when editing the page?
4. Can you let us know of any findings in: [Log Scanner and Scheduled Log Scanner](https://confluence.atlassian.com/support/log-scanner-and-scheduled-log-scanner-790796841.html?)

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


author: G.M. K.
body: 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


author: WW
body: 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.

comments: author: roman
body: Hi [@WW](/t5/user/viewprofilepage/user-id/1209024),

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.


Tags: atl-adm

rest-api

update