Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple issues for export / import: REST api error 400, Tree in left hand pane is broken, Draw.io

Chris Cilino
Contributor
August 13, 2020

Hello

I continue to face issues when exporting and importing a space.  For reference, previous issues are 

Cloud Version: 1000.0.0-ea8824db2a3f

Symptoms:

Issue 1:  Odd Parent item with home icon, can't expand it. 

  1. After import, the Pages tree in the left hand pane won't expand for 24 hours (I think). When I attempt to expand the top-level item I see a spinning progress wheel (shown below):       
  2.  2020-08-13_16h38_37.png
  3. I'm unsure why this tree item with a home icon is even appearing in my pages tree in the left hand pane. A top level tree item with the home icon does NOT appear in my exported space.

Issue 2: Some custom content of type Draw.io can't be found

  1. Some ccustom content like draw.io diagrams can't be found. When I select the "draw.io Diagrams" from the left hand pane and then select some of the diagrams, I get a page saying "Diagram not found". This does not happen with all of the draw.io diagrams. However when I export and import, the issue always appears with the same diagrams. 

2020-08-13_16h44_14.pngAfter Selecting System Diagram - Test Cell 1.0 I see:

2020-08-13_16h44_47.png

Issue 3: REST API returns Error 400 when attempting to update some pages.

3 out of 172 pages return this error when I attempt to use the REST API PUT on /rest/api/content and pass in the JSON for the update page. The exact error is:

{"statusCode":400,"data":{"authorized":false,"valid":true,"errors":[],"successful":false},"message":"com.atlassian.confluence.api.service.exceptions.BadRequestException: Content body cannot be converted to new editor format"}

One two of the pages, I use the new link feature (I don't know what it's called). If you copy and paste a full url to a page, confluence renders it as the page name. So I have three of those  "Display As Link" links in the source page. When I export that page, import it and then try to use the REST API to update the page, I get error 400. If, in the exported page, I delete the "Display as Link", save, add the Display as link back, then I can use the rest API.

On another page my link doesn't include the base address. It just starts off with "/wiki/spaces<rest of the url>". I'm guessing confluence assumes the current base url... but for whatever reason, that kind of url also breaks the rest api.

 

To the Atlassian support team, I have a space exported that should easily reproduce the problem if you're interested in seeing it. In the meantime, I'm going to act like the "display as link" breaks the rest api and avoid it. 

 

3 answers

1 accepted

0 votes
Answer accepted
Chris Cilino
Contributor
August 24, 2020

Updating the community on my progress

Issue 3 is a known bug: https://jira.atlassian.com/browse/CONFCLOUD-69902

Issue 1 has "magically" disappeared

Issue 2: This is "kinda" my fault. Before I export a space I'm deleting all history of pages and attachments for various reasons. When using the "pageIDs" import, draw.io is looking for a specific version of a diagram... that I had deleted. So the solution was for me to write a small algorithm that changes the "revision" parameter in the draw.io xml of the storage format to to"1". Then I run the reindexing and pageIDs import. Draw.io said they will look into making the page ids import functionality more robust to handle this case.

While changing "revision" back to 1 solves the problem for the source draw.io diagrams, it does not fix the embedded draw.io diagrams. So I'll need to also write a script to adjust the "baseURL"  and "pageId' xml of the embedded draw.io in the page storage format. I'm hoping I won't have to change the "imgPageId" as well... because I have no idea how to get that number. 

0 votes
Chris Cilino
Contributor
August 17, 2020

Update to issue 1. As of cloud version 1000.0.0-7311b18208cf there is no longer a delay or odd behavior with the left hand pane tree. 

0 votes
Chris Cilino
Contributor
August 14, 2020

update for Issue 2 above.

If I wait a few hours and then run the draw.io re-indexing (beta) utility, the missing diagrams symptom is alleviated. Unfortunately, Page ID's export \ import doesn't seem to fix links in the draw.io diagrams though. I've contacted draw.io for help with regarding the links.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events