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

Links in the SVG of the diagram are not updated when the linked page is moved/renamed, for XWiki versions 11.10.3, 12.0 #138

Closed
ane-gabriela opened this issue Apr 14, 2020 · 2 comments

Comments

@ane-gabriela
Copy link

@ane-gabriela ane-gabriela commented Apr 14, 2020

Steps to reproduce:

  1. Create a page eg. Page 1
  2. Create a diagram with shapes that contain text
  3. Add a link on one of the text to Page 1
  4. Move / Rename "Page 1" to "Sandbox.Moving Page"
  5. Access the diagram
  6. Observe the link to the page
  7. Click on More Actions > Export > Export as PDF
  8. Deselect all selections > Export

Expected results: The link to the page is updated with the new location and name. Related to #110

Actual results: The link to the page appears as it was initially created, it's not updated.

Environment: Windows 10, XWiki 11.10.4 with MySQL 5.7 and Chrome 81

RenamedPage

PDFExport

PDF Export xwiki_Diagram_Diagram+5_WebHome.pdf

@oanalavinia
Copy link

@oanalavinia oanalavinia commented Apr 15, 2020

Not reproducing on 9.11 XWiki version. Seems to be only on newer versions and only about updating the SVG attachment after rename.

Workaround: a new edit + save of the diagram will update the SVG as well

@oanalavinia
Copy link

@oanalavinia oanalavinia commented May 4, 2020

After some investigations this issue is a platform issue having the same cause as https://jira.xwiki.org/browse/XWIKI-17187

So this will be reproducing in XWiki versions 11.10.3, 12.0 and is fixed starting with 12.3-rc-1, 11.10.5, 12.2.2

Investigation:
The issue is caused by https://github.com/xwikisas/application-diagram/blob/master/application-diagram-api/src/main/java/com/xwiki/diagram/internal/handlers/DiagramContentHandler.java#L122
where getExternalURL and getURL are not returning the right value (more details on the JIRA issue pointed above), so the new content of the attachment is not actually an updated one.

@oanalavinia oanalavinia removed this from the 1.14 milestone May 7, 2020
@oanalavinia oanalavinia added this to the 1.13.1 milestone May 7, 2020
@oanalavinia oanalavinia self-assigned this May 8, 2020
@oanalavinia oanalavinia changed the title Links in the diagram are not updated when the linked page is moved/renamed, in a PDF export Links in the SVG of the diagram are not updated when the linked page is moved/renamed, for XWiki versions 11.10.3, 12.0 May 8, 2020
@mflorea mflorea removed this from the 1.13.1 milestone Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants