-
Bug
-
Resolution: Unresolved
-
Low
-
Minor
-
1
-
Issue Summary
The Copy Page Hierarchy copy API (https://developer.atlassian.com/cloud/confluence/rest/api-group-content---children-and-descendants/#api-wiki-rest-api-content-id-pagehierarchy-copy-post) takes parameters allowing the titles of copied pages to be specified. When this results in a conflict, the error returned by the API can be slightly misleading in the sense of where to look for the conflict.
Steps to Reproduce
- Create a page titled ConflictBugParent (let's refer to the allocated content ID of this page as conflict-bug-parent).
- Within page ConflictBugParent, create a child page titled ConflictBug (let's refer to the allocated content ID of this page as conflict-bug).
- Outside the ConflictBugParent hierarchy, create a page titled Template-ConflictBug (let's refer to the allocated content ID of this page as template-conflict-bug).
- Invoke the as indicated in the following curl command and observe the error message returned:
curl --request POST \ --url 'https://some-tenant.atlassian.net/wiki/rest/api/content/template-conflict-bug/pagehierarchy/copy' \ --user '' \ --header 'Content-Type: application/json' \ --data '{ "copyAttachments": true, "copyPermissions": false, "copyProperties": true, "copyLabels": true, "copyCustomContents": true, "destinationPageId": "conflict-bug-parent", "titleOptions": { "prefix": "", "replace": "", "search": "Template-" } }'
Expected Results
The Copy Fails with the message:
The copied pages have conflicting page titles. e.g.: ConflictBug. Please specify a page title prefix to avoid conflict.
Actual Results
The Copy Fails with the message:
The copied pages have conflicting page titles. e.g.: Template-ConflictBug. Please specify a page title prefix to avoid conflict.
This is misleading because the error is referencing the old title of the page before the titleOptions are applied.
Workaround
None
- mentioned in
-
Page Loading...