Unexpected legacy page conversion when renaming a page

We’ve run into what seems like a bug; renaming a legacy page via API causes it to be converted to the new page experience. Has anyone else seen this issue?

Steps to reproduce:

  1. Create a new page based on the “Legacy editor page” template.

  2. Get the page via: GET /wiki/rest/api/content?spaceKey=TEST&title=Legacy%20Test&expand=version

  3. Modify the returned page data: replace the version object with { number: last+1 } and set a new title.

  4. Update the page using the modified data from above via: PUT /wiki/rest/api/content/{ID}/

Also there are some curious content property changes as a result of the update. Before the update:

After the update:

3 Likes

Hi @TimPesce,

When you say “update the returned contents”, I presume this means updating the body of the page. If so, you can provide the page content in either storage or editor2 format. Which of these were you using?

Regarding the editor content property, this is used to indicate the version of the editor to be used for the page.

Regards,
Dugald

Apologies @dmorrow, my description wasn’t clear; we aren’t retrieving the body content. What I meant to say is that we are using the response from the GET, updating the title and version, and then sending that back via PUT.

Hi @TimPesce,

Thanks for clarifying this, I can reproduce the issue now. It seems that the conversion to the new editor format takes place regardless of whether the content is supported by the new editor. For example, I reproduced this with nested expand links:

I’ve raised [CONFCLOUD-71294] Updating a page transitions content to the new editor - Create and track feature requests for Atlassian products. to address this.

Regards,
Dugald

2 Likes

Fantastic! Thank you @dmorrow!