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

Paths to images inserted into diagrams become invalid at upgrade #11

Closed
aifrimxwiki opened this issue Aug 30, 2018 · 2 comments

Comments

@aifrimxwiki
Copy link

commented Aug 30, 2018

When adding an image to a diagram, the path of the image is created with the current version of the application.
/xwiki/webjars/wiki%3Axwiki/draw.io/8.9.9/img/clipart/Gear_128x128.png
Steps to reproduce:

  • create a new diagram
  • select More shapes, check Clipart and click "Apply"
  • open "Clipart / Computer" (or any other Clipart category) and add an image to your diagram

Result:

  • at an upgrade, the image becomes unreachable unless manually updating the path.
    wrongimagepath

Expected result:

  • the images are properly displayed after the upgrade
    correctimagepath
@mflorea

This comment has been minimized.

Copy link
Collaborator

commented Aug 30, 2018

Many of the shapes you can insert into a diagram are images loaded from the draw.io WebJar. The problem is that the WebJar URL includes the WebJar version so the URLs of all these shapes include the WebJar version. Upgrading the WebJar version breaks the shapes from the existing diagrams.

slauriere added a commit that referenced this issue Feb 7, 2019
slauriere added a commit that referenced this issue Feb 19, 2019
- Update text info explaining what the script does.
- Mention the existing bug #11.
- Use clean='false' in the html macro.
- Add CSRF protection.
- Switch from Groovy to Velocity.
- Retrieve the draw.io extension directly.
- Retrieve only the diagrams that need to be migrated.
- Add warning to the application home page in case some migration is needed.
slauriere added a commit that referenced this issue Feb 20, 2019
- Remove programming rights
- Add page containing a common macro
slauriere added a commit that referenced this issue Feb 25, 2019
#18: Create a migration script for diagrams affected by #11
@oanalavinia oanalavinia self-assigned this Sep 11, 2019
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Oct 3, 2019
…isas#11

* removes from the graph and the cached svg the information about draw.io at save action and adds it for view mode, export as pdf (when there is no attachment and the svg is used) and also when entering in edit mode
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Oct 4, 2019
…isas#11

* remove draw.io info from the graph xml directly, without traversing graph cells
* for export as svg add draw.io info on the output svg, without saving it
@mflorea mflorea added this to the 1.9 milestone Oct 4, 2019
oanalavinia added a commit to oanalavinia/application-diagram that referenced this issue Oct 4, 2019
oanalavinia added a commit that referenced this issue Oct 4, 2019
Paths to images inserted into diagrams become invalid at upgrade #11
@oanalavinia oanalavinia closed this Oct 4, 2019
@oanalavinia

This comment has been minimized.

Copy link

commented Oct 9, 2019

For this fix to be applied in the context of a diagram an edit step it is needed (for updating the sources). Meaning that upgrading an older version to 1.9 will still be showing a link to the migration script. But for diagrams created or edited stating with 1.9 there is no additional step required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.