Draw.io not showing latest diagram version in Confluence page

Hi,

Since this morning I'm the only one in my team experiencing the following behaviour with Draw.io (free version) in the Cloud version of Confluence:

I have an existing diagram that has a history of over 40 versions. When I edit the diagram and press save and then publish the page, the page does not show the latest version of the diagram.

When looking at the page attachments, it shows that the new version of the diagram and the png were stored successfully, but when looking in the HTML source code, the revision tag of the draw.io URL still points at the previous version.

I verified the following:

  1. making textual changes to the Confluence page works as expected
  2. clearing cache, or using a private browsing session doesn't help
  3. deleting the diagram and creating a new one, gives the same problem!!
  4. updating a different diagram on another page gives the same problem
  5. other team members updating their own diagrams have no problem
  6. other team members updating my diagram experience the same problem

It appears that for some reason my account has a problem with updating the macro code in the confluence page, but I don't know much about how that works.

Anybody ever experience this?

Thanks,

Raymond

7 answers

1 accepted

We've pushed a workaround to this problem. We're ignoring the revision parameter both in the page viewer and when loading the diagram for editing, so you'll always get the latest in both cases.

The side-effect of this is the latest version of a diagram will always be displayed, even if you revert the page to a revision. This is obviously not ideal, so we will continue to press Atlassian to investigate why the save macro call, that worked for 2 year previously, has suddenly failed.

If you do not see correct operation, please clear the browser cache. Apologies for the inconvenience caused.

Hi David,

This indeed seems to solve the problem I described.

As for the ability to go back to an earlier revision, the only way to do that with this workaround in place, would be to go to the 2 page attachments and manually delete any undesired revisions from both attachments until the desired revision is the current, right?

Since this is only a workaround for the actual problem, will this thread be updated with any feedback from the Atlassian investigation?

Thanks for jumping on this so quickly, it's greatly appreciated!

Raymond

To go back to an earlier version, download that version of the attachment (sorry, no preview there), edit the diagram, drop the downloaded attachment in (after clearing the diagram) and save. No need to delete attachment revisions.

I'll certainly update when (if) Atlassian fix the problem. The problem then is that we can't simply undo the workaround. More and more macros are getting out of date (i.e. the revision behind the latest version). If we switch that back on, all these diagrams will suddenly show the wrong version.

The change from us will be to create a revision parameter and start setting that. Only when we see that parameter will we use it, the old parameter is now unreliable.

Hi David,

thank you heaps for taking action so quickly. Please keep us posted when there are news. I only recently started using confluence and draw.io. I think you are doing a great job with the plugin.

Thanks for your effort David, as Stefan mentions we appreciate your efforts! I've marked your workaround as the answer to my question.

Hi,

 

I am facing the same issue since morning. Have tried updating the diagram a number of times. Still not resolved.

 

Thanks,

Aileen

Sorry we didn't reply to this earlier, but this site doesn't send out notifications for watched tags any longer.

We've got 5 or 6 report on this now. I'll use this thread as a master thread and point everyone else at it.

The diagram rendered on the confluence page has two parts, the macro and the data attachment. The data attachment is a page attachment that contains the data for the diagram. It is writing correctly, so you're not losing data.

The macro contains the JavaScript to load the attachment and render it. The macro has a state (parameters) and one value of that state is the revision of the attachment to load.

When the diagram is saved you exit the editor, we first try to save the image preview, then the macro (updated to the next revision of the attachment). The saveMacro call is surrounded by a try/catch and if the saveMacro call fail it should hit the catch which shows an error in the diagram editor and does not exit.

On inserting a new diagram this can mean the macro doesn't write at all, so the data appears to be lost.

The saveMacro call is failing for specific users, suddenly, from about 24 hours ago (Friday morning US time). Things that don't fix it:

  • Clearing cache
  • Using different browsers

If you need to recover a diagram that you newly inserted, or edited, follow the steps described in this FAQ, https://desk.draw.io/solution/articles/16000041415-how-to-recover-a-draw-io-diagram-when-the-confluence-page-edit-session-times-out-. The bug is different, but the outcome is the same. Note you may have to get someone else on the same instance who isn't experiencing this problem to perform the steps.

In terms of debugging:

  • Is anyone willing to let me onto their Confluence to debug directly (hopefully I'll hit it)? Email support@draw.io if yes.
  • Try uninstalling and re-installing the plugin.
  • Please send a screenshot of the browser debugger console output to support@draw.io referencing this thread.
  • There was a mention of this starting when the new user interface was launched, did this happen right after launch for all of you affected?

We will file an issue with Atlassian, but in the meantime all information possible will help us find a workaround.

We considered switching off processing the revision parameter when viewing and loading the diagram to edit. The problem with this is:

  • The vast majority of user are not affected and it would break reverting diagrams in step with pages for everyone
  • It doesn't help the insert new diagram case, the macro still won't be written

Related to this thread.

Hi,

I also notice today that we can't update or create new io.draw diagram on Confluence Cloud.

- On Chromium[1]

When creating a new diagram and add a text then save with the filename Hello, and publish, the Confluence page shows `Error: Invalid descriptor`. However, if I download the attachments, Hello.png and hello.xml and open then directly in io.draw, I can see the text.

If I try to edit the newly create diagram from Confluence, io.draw pop up the window to choose a template(e.g. Blank Diagram). If I select a Blank Diagram and add again a text and save, input again the filename. io.draw says `File already exists`.

If now I edit an existing diagram, created few weeks ago, I can see the diagram in io.draw editor. If I edit it and add a text, I can save it. When publishing the Confluence page, the change is not rendered. However, if I edit again the Confluence page, I can see my changes in the macro rendering. However again, if I edit the diagram in io.draw, the change is lost. Likewise creating a new diagram, if I download the attachments and open them directly in io.draw, I can see the text.

Chromium console log when editing an existing macro:

chromium-console.jpg

- On Firefox[2]

I can create a new diagram and save it. If I update it and publish, the attachments(png and xml) are updated but the Confluence page does not show the changes after publishing. When editing the Confluence page I can see my changes in the macro rendering window.

That's odd! The io.draw plugin was working well like 2 weeks ago (Sep 25, 2017).

- Confluence Cloud version: 1000.0.0-781c963
- io.draw Confluence plugin version:1.4.2-AC

Regards,
Mickael

- [1] Chromium version: 61.0.3163.100 (Official Build) Built on Ubuntu , running on Ubuntu 16.04 (64-bit)
- [2] Firefox version: 56.0 (64-bit) Mozilla Firefox for Ubuntu

Sorry we didn't reply to this earlier, but this site doesn't send out notifications for watched tags any longer.

We've got 5 or 6 report on this now. I'll use this thread as a master thread and point everyone else at it. (This is technical in parts).

The diagram rendered on the confluence page has two parts, the macro and the data attachment. The data attachment is a page attachment that contains the data for the diagram. It is writing correctly, so you're not losing data.

The macro contains the JavaScript to load the attachment and render it. The macro has a state (parameters) and one value of that state is the revision of the attachment to load.

When the diagram is saved you exit the editor, we first try to save the image preview, then the macro (updated to the next revision of the attachment). The saveMacro call is surrounded by a try/catch and if the saveMacro call fail it should hit the catch which shows an error in the diagram editor and does not exit.

On inserting a new diagram this can mean the macro doesn't write at all, so the data appears to be lost.

The saveMacro call is failing for specific users, suddenly, from about 24 hours ago (Friday morning US time). Things that don't fix it:

  • Clearing cache
  • Using different browsers

If you need to recover a diagram that you newly inserted, or edited, follow the steps described in this FAQ entry. The bug is different, but the outcome is the same. Note you may have to get someone else on the same instance who isn't experiencing this problem to perform the steps.

In terms of debugging:

  • Is anyone willing to let me onto their Confluence to debug directly (hopefully I'll hit it)? Email support@draw.io if yes.
  • Try uninstalling and re-installing the plugin.
  • Please send a screenshot of the browser debugger console output to support@draw.io referencing this thread.
  • There was a mention of this starting when the new user interface was launched, did this happen right after launch for all of you affected?

We will file an issue with Atlassian, but in the meantime all information possible will help us find a workaround.

We considered switching off processing the revision parameter when viewing and loading the diagram to edit. The problem with this is:

  • The vast majority of user are not affected and it would break reverting diagrams in step with pages for everyone
  • It doesn't help the insert new diagram case, the macro still won't be written

Hi,

I already tried to recover the image from attachments and I can also see the latest image as preview (in editor). But since that is a PNG format I cannot load it to the editor to work.

Hi Aileen, next to the PNG attachments there should be a similar attachment without extention. This is where the source files of the diagram are stored and you will see that its revision history will be in sync with the PNG versions. 

HTH,

Raymond

Hi Raymond,

I can see a "View Source" option and when I click it I can see the image preview. But again, I don't see any option to reload this into the editor. Not sure if I am missing anything here.

Screen Shot 2017-10-15 at 10.10.58 PM.png

 

Screen Shot 2017-10-15 at 10.13.43 PM.png

Hi Aileen,

You should choose the first menu option called “Attachments”. As you see from the number, there are 2:

one with a name that ends with .PNG containing each version of the image.

then, there’s a second attachment with the same name but without the .PNG. If you open this one, you’ll see the list of diagram versions that you can download.

after you downloaded the file to disk (it’s probably ending with .txt), you should be able to drop that file on the draw.io object when the page is in edit mode. This should load the diagram from the file.

if this doesn’t work, you can also choose the file import option in the draw.io window (it’s not the file menu of your browser but underneath as part of the web page. There you can import the downloaded file.

Raymond

I've also got this problem (starting happening on Friday).  I've tried all of the steps above, download-drag-and-drop, import, ask a friend, etc but to no avail.

The only way to edit a diagram seems to be:-

  1. Download the latest version of the draw.io attachment (the file without the .png extension)
  2. Edit the page
  3. Delete the diagram
  4. Insert a new draw.io diagram
  5. Drag and drop the downloaded file into the browser
  6. Save the diagram, giving it a different name to the old version
  7. Publish the page

Not too good :-(

That doesn't even work for me. If I create a new diagram it saves the attachments but just displays 'Error: Invalid descriptor' in the confluence page.

@Andrew MillerSince the majority of users that report issues with editing existing diagrams don't report this issue with new diagrams, might I ask you to please add this as a new question and link to it here, so we can focus specifically on this issue in more depth?

I already raised this issue, I got redirected here.

Mario I'm New Here Mar 21, 2018

I have a very similar problem, but when using the "Include Page" confluence macro.

When I edit Draw.io diagrams in the sub-page and publish the changes, it looks fine in the sub-page.

But when I refresh the main page that includes the sub-page, I still see the old diagram.

Text updates on the sub-page do appear correctly in the main page.

In order to work around this I have to do similar to @Jeremy Gooch - copying the diagram elements and then pasting them into a new diagram.

Its not ideal.

@MarioCould you start a new thread for this please. Your issue is different to the original and there's already many different topics here. Thanks.

Hi David

I am facing a similar problem as Raymond - my draw.io does not shows me the latest version of the diagram when i publish the page. i tried clearing all cache but no luck. Is there something i can do to fix this.

0 vote

This issue is becoming EXTREMELY PAINFUL.

It has cost me time, and most recently almost missing a deadline for a drawing that was due, and some re-work.

This is TWICE it has cost me in the critical path of working, and it needs to get fixed, ASAP.

 

PLEASE work out a solution.  I LOVE both products, but the losing of edits, and versions is getting scary to invest alot of time in either product for major projects.

Thanks,

Jeff

Hi Jeff,

Sorry you lost the data. The good/bad news is it's not lost, you can recover it via the process described in https://desk.draw.io/solution/articles/16000041415-how-to-recover-a-draw-io-diagram-when-the-confluence-page-edit-does-not-save-the-macro-

What's happening under the hood is we make a sequence of calls to the Confluence API. One is to save the macro with increment revision on the page, and the other 2 are attachments write, the diagram data and the image preview.

We only leave the editor when we receive a success response from all 3, if we don't, we will not exit the editor. What's happening here is Confluence is return success for the saveMacro call, and then, when the page is saved, the macro isn't updated.

Not being able to trust the return value of the saveMacro call makes life very difficult. The other problem is we've never had access to a Confluence instance where this happens. That means that we've never been able to show Atlassian a reproduction case and they won't follow it up. (And note that other vendors with macros suffer the same problem).

All said, we sat down this week to think about workarounds and we believe we have an algorithm that reliable detects that the save macro call in fact failed and will rewrite the page with the correct macro dynamically.

We'll aim to roll it out in the next 2 weeks.

Thanks,

David

Hi David,

Are you confident you thought through page-include/exerpt-include cases too? Our aggregated pages are displaying all the wrong diagram versions, and we think it's a new issue. To be clear we have stand-alone pages with one diagram per page, and an aggregated page that uses page-include macro to render all the diagrams together.

Just writing this in case it might be related to this fix you talk about.

Atlassian fixed the problem that Jeff refers to. If you have a specific issue with includes, make sure you're on the latest version of the plugin and maybe start a new thread about this, since this thread is specific to the issue with Atlassian's failure to execute saveMacro correctly.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

478 views 19 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you