-
Bug
-
Resolution: Fixed
-
Medium
-
21
-
Severity 3 - Minor
-
1
-
Issue Summary
When our instance is rolled out to the new editing experience if we create a new page or space using API, this page and space is created in the old editor and are not converted to the new editing experience when edited.
Environment
- Cloud
- New Editing Experience
Steps to Reproduce
- Create a page via API - you can use the below curl:
curl -i -X POST \ -u '<email_address>:<API_TOKEN>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "title": "<PAGE_TITLE>", "type": "page", "space": { "key": "<SPACEKEY>" }, "status": "current", "body": { "storage": { "value": "<p>Better days will come :D</p>", "representation": "storage" } } }' \ https://<SITE_NAME>.atlassian.net/wiki/rest/api/content
To create your API token, jump here
- Go to the page you just created;
- It is with the old editor, try to edit it.
And - Create a space via API - you can use the below curl:
curl --user someUser@myDomain.com:apiTokenHere - -request POST --url 'https://<SITE_NAME>.atlassian.net/wiki/rest/api/space' --header 'Accept: application/json' --header 'Content-Type: application/json' --data '{"key":"ACS","name": "API Created Space","description": {"plain": {"value": "someValue","representation": "someRepresentation"}}}'
Expected Results
When accessing the page/space overview page, the published version should be already in the new editor, but even editing it, the page should be converted to the new editing experience.
Actual Results
The pages is with the old editor and doesn't get converted.
Workaround
It's possible to simply add the following metadata to the request's payload, so the page will be created using the new editor:
"metadata": { "properties": { "editor": { "key": "editor", "value": "v2" } } }
Here's a complete example;
fetch("https://INSTANCE.atlassian.net/wiki/rest/api/content", { "credentials": "include", "headers": { "content-type": "application/json", }, "body": `{ "title": "Test new page (API)", "type":"page", "status":"current", "space":{ "key":"TS" }, "body": { "storage": { "value": "<p>Created through the REST API</p>", "representation": "storage" } }, "metadata": { "properties": { "editor": { "key": "editor", "value": "v2" } } } }`, "method": "POST", });
- is related to
-
CONFCLOUD-68008 Imported Word document opens the page in Legacy editor instead of Fabric
-
- Closed
-
-
CONFCLOUD-69830 Pages created via API in the new editor format are converted to the legacy editor after version restore
-
- Closed
-
- relates to
-
CONFCLOUD-72852 Creating a space via Jira project doesn't load the new editing experience
-
- Closed
-
- was cloned as
-
CONFCLOUD-78803 Creating a page via API doesn't load the New Editing Experience
-
- Gathering Impact
-
- mentioned in
-
Page Failed to load
Form Name |
---|
I am also having this issue when creating pages with Python. And I found that some pages restored by the Rewind Backup product also had this issue. On first examination, it appears that these were simple pages without any new editor macros.