Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving imported draw.io file fails #267

Closed
avision-it opened this issue May 17, 2024 · 3 comments · Fixed by #272
Closed

Saving imported draw.io file fails #267

avision-it opened this issue May 17, 2024 · 3 comments · Fixed by #272

Comments

@avision-it
Copy link

avision-it commented May 17, 2024

Some imported draw.io files fail to save in a diagram page. I think it's related to embedded images or pdfs. Here's the screenshot if you click Save & View:

image

The page is empty afterwards and there are no attachments. The upload fails without further errors in the console or tomcat logs.

I've tested it on a fresh install and our production system.

I've attached a test file that fails to save. Can you please look into this problem?

Test_12224.zip

XWiki 15.10.8, Diagram Application Pro 1.20.4

@petrenkonikita112263
Copy link

Indeed, I can also reproduce by attempting the import not only your file, but any drawio file from sample page. However, if I use import from URL and put the full URL like this https://raw.githubusercontent.com/jgraph/drawio-diagrams/dev/examples/uml-activity-example.drawio after saving the diagram is present.

msedge_8bFBL0qiil.mp4

@avision-it
Copy link
Author

Hmm, i get one step further with Import from URL. But i still can't save the diagram. This error message occurs when saving:

image

But I'm not logged off and it's not an authorization problem. I'm clueless what could be the problem...

@oanalavinia
Copy link

oanalavinia commented May 21, 2024

There are 2 issues here.
The first issue is that for the specific file from the issue description, the upload size limit is reached and so the save is blocked. I will check, but most probably I would have to add a diagram configuration to let admins modify this limit when needed (I created #268 for this)

The second one is that indeed, you cannot save the diagram after importing any draw.io file. This is related to the implementation of the multiple pages feature in #250 , so it was introduced in version 1.22.3
Checking to fix the issue as part of this ticket. Until then, a workaround would be to downgrade Diagram Application to an older version, e.g. 1.22.2 (the upload limit would still be present)

oanalavinia added a commit that referenced this issue Jun 12, 2024
* WIP: this is a version that works partially, there are still cases that need to be handled
* it is not working if you import on a empty diagram multiple pages, the first page is lost
oanalavinia added a commit that referenced this issue Jun 18, 2024
* fix remained usecase, where the import was failing on empty diagram
* copied method from a recent version of drawio to include a fix - in the old version of the method, when you import a diagram file on an empty diagram, they would unload the old XWikiFile and use LocalFile, and this breaks a lot of functionalities
* update setData too, since pages are already initialized at that point
oanalavinia added a commit that referenced this issue Jun 18, 2024
* copied method from a recent version of drawio to include a fix - in the old version of the method, when you import a diagram file on an empty diagram, they would unload the old XWikiFile and use LocalFile, and this breaks a lot of functionalities; this should be removed once we upgrade to a recent version of drawio
* update setData too, since pages are already initialized at that point
@oanalavinia oanalavinia linked a pull request Jun 18, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from In Progress to Done in ProAppsRoadmapJune-July2024 Jun 18, 2024
@oanalavinia oanalavinia added this to the 1.20.5 milestone Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants