When using Confluence's REST API to copy pages, it won't be possible to publish edits to them.
It's happening to either single pages or to pages copied in bulk using the /rest/api/content/PAGE_ID/copy endpoint.
- create some pages in the new editor
- use the copy page api to copy the pages to another space
- Try to edit and publish some of the copies
It should be possible to publish edits to the copies
The following error is shown:
This content cannot be accessed.
Your session may have expired. You'll need to log in again or switch to another account to keep working.
Log in or switch to another account
The request responds with a 404:
- This also happens when copying a single page using the same endpoint
- Edit the page
- Click on ••• and select View Changes
- Close the changes dialog and Publish the page
- Create a new bookmark to any page in your browser.
- Edit the bookmark: change name to 'Fix page' (or any other suitable name) and change address to the following:
- Save the bookmark. For convenience move it to some easily accessible place (for example Bookmarks Bar in Chrome).
- Navigate to the page that you can't edit and invoke the added bookmark. You should now be able to edit the page.
- Navigate to the page that you can't edit and open Developer Tools (Chrome), Web Inspector (Safari) or the alternative in your browser.
- In the Developer Tools open Console.
- Paste the following code to the console and press Enter:
- You should see the "Page fixed" message, and after that you should be able to edit the page.