Bug 123627 - FILEOPEN DOCX Hyperlink’s target folder changes if making a copy in a different folder
Summary: FILEOPEN DOCX Hyperlink’s target folder changes if making a copy in a differe...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.2.1 release
Hardware: All All
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:6.4.0
Keywords: filter:docx
: 123646 125314 127816 (view as bug list)
Depends on:
Blocks: Hyperlink DOCX-Hyperlink
  Show dependency treegraph
 
Reported: 2019-02-21 14:43 UTC by NISZ LibreOffice Team
Modified: 2020-01-08 15:27 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
The original file (17.40 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-02-21 14:43 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer. (206.50 KB, image/png)
2019-02-21 14:43 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-02-21 14:43:07 UTC
Description:
Making a docx file in MSO and creating a Hyperlink with its target as a folder and making a copy of the file and opening in LO changes the target of the Hyperlink essentially making it unusable the same happens with files.

Steps to Reproduce:
    1. Create an docx at C:/ in MSO
    2. Create a Hyperlink with Insert→Hyperlink with a target folder of C:/New folder and save the docx.
    3. Create a copy of the docx in C:/New folder.
    4. Open it with LO.
    5. Notice the Hyperlink’s target is  C:/New folder/New folder

Actual Results:
The Hyperlink’s target changes when creating a copy of the file

Expected Results:
The Hyperlink’s target stays unchanged.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2019-02-21 14:43:41 UTC
Created attachment 149481 [details]
The original file
Comment 2 NISZ LibreOffice Team 2019-02-21 14:43:59 UTC
Created attachment 149482 [details]
Screenshot of the original document side by side in Word and Writer.
Comment 3 Durgapriyanka 2019-02-22 19:04:11 UTC
*** Bug 123646 has been marked as a duplicate of this bug. ***
Comment 4 Buovjaga 2019-03-20 14:04:23 UTC
Not reproduced with MSO 2013 and LibO Version: 6.3.0.0.alpha0+
Build ID: a26524e348fe06b93c26b1b1fa3dae3a5b26d6fa
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-03-20_11:11:19
Locale: fi-FI (fi_FI); UI-Language: en-US
Calc: threaded

What version of MSO are you using?
Comment 5 Gabor Kelemen (allotropia) 2019-03-20 15:12:35 UTC
Might have been MSO 2007 as well. We should recheck with more recent ones.
Comment 6 Adam Kovacs 2019-03-21 12:29:32 UTC
It seems like LO mixes the absolute link with the relative link.
Comment 7 Xisco Faulí 2019-07-05 10:15:14 UTC
(In reply to Gabor Kelemen from comment #5)
> Might have been MSO 2007 as well. We should recheck with more recent ones.

Any update ?
Comment 8 Gabor Kelemen (allotropia) 2019-07-15 08:15:27 UTC
(In reply to Xisco Faulí from comment #7)
> (In reply to Gabor Kelemen from comment #5)
> > Might have been MSO 2007 as well. We should recheck with more recent ones.
> 
> Any update ?

So we checked and the original instructions were not perfect: in step 3 saving to another file is necessary, not copying (with a file manager).
Comment 9 Gabor Kelemen (allotropia) 2019-07-15 11:03:19 UTC
More detailed reproduction steps:

1, In Word create a file with a hyperlink to a local folder ("Új mappa" in the example file).
2, Save the file to a different directory (say, Test in your home dir) and reload it. Clicking the hyperlink will open the same folder.

3, Open the original file in Writer, and make sure that Settings - Load/Save - General - Save URLs relative to filesystem is checked.
3, Click the hyperlink, the folder will open
4, Save the file to a different directory (say, Test in your home dir) and reload it. Click the link and it will NOT open, since it will try to look up the "Új mappa" directory inside the same "Test" directory where the saved file is.

5, Disable Settings - Load/Save - General - Save URLs relative to filesystem
6, Reload the original Word file
7, Save the file to the Test directory and reload it. Click the hyperlink, and it will open correctly the "Új mappa".

We think this happens because of: 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=40acf8d6447065077acba9e800c56239f58c8262
Comment 10 Commit Notification 2019-07-17 11:57:29 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/217a80fd205c7f61794c863898cb7cfd1a17e78f%5E%21

tdf#123627 DOCX import: fix relative hyperlinks to documents

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2019-07-18 07:54:51 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/d91209f354163133eaaac0cf6e708f647d1aff17%5E%21

Revert "tdf#123627 DOCX import: fix relative hyperlinks to documents"

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2019-07-25 07:32:21 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/4c30848c852c44cbad8509c770feed5244f1940f%5E%21

tdf#123627 DOCX import: fix relative hyperlinks to documents

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2019-07-25 15:05:07 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/9136237ac0758b11831c21cd636520b08c88b209%5E%21

tdf#123627 DOCX import: fix tinderboxing

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2019-07-26 09:02:43 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/a675fe37abc134cc5cbf54385ca99c8d1417ce2b%5E%21

tdf#123627 DOCX import: fix tinderboxing

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2019-08-21 10:46:37 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/cd293966322a45dec000c6612979c267307a3868%5E%21

tdf#123627 DOCX import: fix tinderboxing

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 NISZ LibreOffice Team 2019-09-24 09:26:03 UTC
*** Bug 125314 has been marked as a duplicate of this bug. ***
Comment 17 NISZ LibreOffice Team 2020-01-08 15:27:18 UTC
*** Bug 127816 has been marked as a duplicate of this bug. ***