xwikisas / application-diagram

Create various types of diagrams using draw.io
GNU Lesser General Public License v2.1
0 stars 8 forks source link

PDF export from a diagram page in edit mode is exporting the Draw.io logo instead of the requested diagram #175

Closed AndreeaChi closed 3 years ago

AndreeaChi commented 3 years ago

Hi team!

This issue was reproduced on a local Jetty XWiki 13.0 (and on a Docker container, still XWiki 13.0 version), Diagram Pro version 1.15.4 .

Steps to reproduce:

  1. Edit a diagram and choose to export it as a PDF: image
  2. Picked one option (Selection or Crop or Grid, the result is the same with all options).
  3. Either Open in New Window or Download. image
  4. The result is image

The result is the same in full page mode or when I choose the PDF option from Advanced mode as well.

The diagram is exported when choosing the export as PDF option from the XWiki page menu.

In case the diagram I tested with could be useful, here it is a xar export of it in a zip (as this one was supported by git at upload):

Diagram.project-organization-team.WebHome.zip

Thank you for your help!

mflorea commented 3 years ago

@AndreeaChi have you tested with other diagrams? Are you able to export a very basic diagram that has for instance a single shape?

oanalavinia commented 3 years ago

@mflorea I just tested and it seems to be the same result even for a simple diagram

Later edit: the problem seems to be that the export url that we have is no longer available https://github.com/xwikisas/application-diagram/blob/master/application-diagram-ui/src/main/resources/Diagram/DiagramConfig.xml#L90 Updating it

oanalavinia commented 3 years ago

The export from the diagram page uses an external service from draw.io and the url for this is the Diagram configuration page. The issue is caused by the fact that draw.io moved to diagrams.net space, so the export url that we provided was also changed.

Note that the fix can also be manually applied from Global Administration > Other > Diagrams by adding https://convert.diagrams.net/node/export as Export URL

gtothill commented 3 years ago

Thanks all - this was one that I reported - the new API URL works fine. All the best, Geoff.