Cannot edit pages created via copy single page API

I am also running into this issue. The browser console in the editor gives me an error like this: com.atlassian.confluence.api.service.exceptions.No… find content with ID 1458241870 and status draft.

The error only occurs with some pages, not with others. The only pattern that I can see is that it seems to be that it only occurs when copying pages that were created a while ago. I am unable to reproduce it with newly created pages. I cannot see any other patterns, some of the broken pages don’t even have any content or attachments at all.

@michael-k @candid We just had another customer report this to us. The only new piece of information I have is that the customer is using a free version of Confluence, which I personally have not yet tested with. I don’t suppose you two are using the free Confluence, are you? Seems like a long shot, just following the slim lead there.

@BobBergman @candid the bug occurs on all pages in my confluence development instance which is free and happens to have the “old” style navigation. That’s the only discerning factor I’ve been able to glean. The problem does not occur on my freshly minted paid instance of confluence which has the “newer” style navigation.

@candid on the copied pages with the problem, when I try to edit them I also see an error in the brower console matching what you described.

I’m on the standard plan, but it’s a developer instance.

Strangely, shortly after I could reliably reproduce the issue and reported it here, it does not seem to happen anymore. Even copies that I previously couldn’t edit have now become editable. I’m not sure if I’m doing something differently now or if it’s still reproducible with other pages that I haven’t discovered yet.

One of our customers that reported it is using a regular paid instance of Confluence, so I guess the “free” connection is debunked.

We also received this info:

I refreshed, logged out and back in, I also tried from another machine that I had never used to sign in with Confluence but I still got the message.

The only way I got to make changes to the pages was by clearing cookies several times logging in and out several times and the system allowed to make changes.

Not sure what the current status of this issue is, but we also had a customer report the exact problem reported by @michael-k.

Context
The current version of our app Scroll Documents for Confluence uses the ‘CopyPageHierarchy’ API.

@rwhitbeck any insight?

@rwhitbeck this issue with the copy single page api continues. My app is being reviewed and the reviewer is encounterung an error editing one of the pages copied with the api. They are getting the following error which is exactly what I was seeing in the browser Javascript console and it also matches the error reported by @candid

PUT
{instance_url}wiki/rest/api/content/462028801/?status=draft&action=publish

{"statusCode":404,"data":{"authorized":false,"valid":true,"errors":[],"successful":false},"message":"com.atlassian.confluence.api.service.exceptions.NotFoundException: null"}

Here’s my marketplace service desk ticket
https://ecosystem.atlassian.net/servicedesk/customer/portal/9/AMKTHELP-23184

We still hear reports of this from time to time as well using the copy page hierarchy API. We recently had a customer uninstall one of our apps because of it.

Could we at least get an issue opened with Confluence that we could point customers to?

I’ve reengaged the engineering team on this again.

When we helped @BobBergman and his customer it was discovered that they didn’t use the copyPermissions property as set to true. Once they did that they we’re no longer having problems and the ticket was closed.

However looking at your original post it looks like you are using copyPermissions.

This thread has also been hijacked a few times and it’s become difficult to follow.

The problem you’re reporting now is the same as the first post in the thread correct?

We’ve had reports of it happening regardless of the value of the copyPermissions input. The only thing I have heard that sometimes helps is to log out, clear browser caches, and log in again.

We’ve had two customers report this error since my last comment. One of them mentioned that waiting 4-5 mins sometimes helps.

@rwhitbeck thanks for following up with the eng team! Yes I am using copyPermissions and yes the problem I’m reporting is the same as the first post in this thread.

We had another customer report that they saw this yesterday with the hierarchy API, but we haven’t managed to gather more information yet.

We are still frequently experiencing this issue, both with the Copy Single Page API and with the Copy Page Hierarchy API.

When creating a page through the Confluence UI or REST API, a draft of that page with the same ID is created. If the page can be accessed through /rest/api/content/1, its draft is available under /rest/api/content/1?status=draft. If I change the page in the editor without saving, the edited content can be accessed by expanding the body field on the draft.

When copying a page using the Copy Single Page API, the copied page doesn’t have a draft. When accessing the copied page through /rest/api/content/2, all works fine, but /rest/api/content/2?status=draft gives me the error that I reported in April: No content found with id : 2.

What’s interesting is that the editor remembers what I typed in despite no draft being there. I assume that Synchrony is caching the editor content. That might explain why sometimes it starts to work after a while. Maybe once Synchrony removes the page from its cache, a draft might be created when editing it.

@rwhitbeck We have 4 new support cases for this problem now using the copy page hierarchy API in the last 12 hours. The rate of this issue is escalating suddenly. Can we get some attention on it please?

The recent uptick in this problem is alarming. If we see more cases today I think we will need to open a critical issue for it.

Confluence Cloud issue for this [CONFCLOUD-70325] Can't publish edits to pages copied with the API - Create and track feature requests for Atlassian products.

A quick update: The team is currently looking more deeply into this problem. We should have more information about a fix for this late next week.

Thanks @rwhitbeck!

btw, this bug and [CONFCLOUD-67045] Copy page hierarchy REST API copies a page tree 5 times - Create and track feature requests for Atlassian products. come up in our support cases at about the same frequency (fairly often).

Maybe the current bug fixing work on the copy APIs could overlap with some work on these other issue?

CONFCLOUD-67045 is related to error handling in the copy page hierarchy API. For some failures, the API retries 5 times and ends up not responding with a failure, but with some incorrectly copied page tree. You folks have Log in with Atlassian account for fixing the error handling.

Also related to problems with page copies: [CONFCLOUD-70056] Copying a page with Giphy attachment using Copy Single Page and Copy Page Hierarchy APIs fails due to an attachment size mismatch - Create and track feature requests for Atlassian products.

Or… maybe [CONFCLOUD-69994] Copying a page with attachments and content properties with Copy Single Page API second time fails with error 500 - Create and track feature requests for Atlassian products. “Copying a page with attachments and content properties with Copy Single Page API second time fails with error 500”

tbh, I’m having a hard time tracking the efforts to fix problems with the copy APIs because there are some similar/overlapping bugs. We do get a lot of support cases for failures that come from this API. Maybe this is a good time to assess what is out there in terms of open bugs and address the related ones in one shot?

Thanks!