Bug 129969 - All hyperlink fail if Calc open xlsx file with remote hyperlink (file://\\remotehost\sharefolder\...) and save it all link inside the file broken
Summary: All hyperlink fail if Calc open xlsx file with remote hyperlink (file://\\rem...
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.3.4.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:7.1.0
Keywords:
Depends on:
Blocks: XLSX-Hyperlink
  Show dependency treegraph
 
Reported: 2020-01-13 03:09 UTC by ian.klpoon
Modified: 2021-02-15 14:23 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
original document that work, hyperlink can be open (11.53 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-05-11 09:16 UTC, ian.klpoon
Details
after save as xlsx, all link fail to open in both libreoffice and m$ office (5.96 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-05-11 09:17 UTC, ian.klpoon
Details
The example file modified to hyperlink to a file on my local drive with # in directory name (64.73 KB, image/png)
2020-10-05 14:26 UTC, NISZ LibreOffice Team
Details
The modified example file saved as xlsx - the # breaks the target into two (63.95 KB, image/png)
2020-10-05 14:27 UTC, NISZ LibreOffice Team
Details
Original file before save (95.02 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-12-10 01:51 UTC, ian.klpoon
Details
The file after save (93.56 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-12-10 01:51 UTC, ian.klpoon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ian.klpoon 2020-01-13 03:09:40 UTC
Description:
our department make many hyperlink in excel to link with other file on the parent folder of a shared network dirve. All file opened there and saved there.

One day i open the xlsx file using libreoffice and made some minor amendment to the file and saved.

Few days later, staff found that all link in the file failed to work in M$ excel nor libre office anymore.

 

Steps to Reproduce:
1.use M$ excel create a file in a network share drive and create hyperlink with other file in the same shared drive
2.open that file with Calc and make some change, and then save it.
3.Ope the file with M$ excel, all link broken.

Actual Results:
link not work

Expected Results:
link still work


Reproducible: Always


User Profile Reset: No



Additional Info:
...
Comment 1 ian.klpoon 2020-01-13 03:35:41 UTC
Bug only happen if you save as xlsx file, no bug is found when saved as ods

So the bug most likely located in the saving as xlsx
Comment 2 ian.klpoon 2020-01-13 03:41:33 UTC
It only happen in xlsx file.  I tried save in xls and the hyperlink is working.
Comment 3 Xisco Faulí 2020-05-11 08:54:57 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 4 ian.klpoon 2020-05-11 09:16:07 UTC
Created attachment 160649 [details]
original document that work, hyperlink can be open
Comment 5 ian.klpoon 2020-05-11 09:17:11 UTC
Created attachment 160650 [details]
after save as xlsx, all link fail to open in both libreoffice and m$ office
Comment 6 ian.klpoon 2020-05-11 09:17:29 UTC
test file uploaded.
Comment 7 QA Administrators 2020-05-12 03:52:32 UTC Comment hidden (obsolete)
Comment 8 NISZ LibreOffice Team 2020-10-05 14:23:42 UTC
Can confirm with current master:

Version: 7.1.0.0.alpha0+ (x64)
Build ID: f266feaebea39668392e3a3830e20e4670344658
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL

Hyperlink with spaces is now correctly retained, but # in folder name turns the path:

file:///Y:/%23test%20folder%20árvíztűrő%20tükörfúrógép/Bizt_kerdoiv%202015-től.doc

into 

file:///Y:/
and target inside document to:
test folder árvíztűrő tükörfúrógép/Bizt_kerdoiv 2015-től.doc

as if it were targetting a spreadsheet cell.

@Tünde Tóth I thought you might be interested in this one.
Comment 9 NISZ LibreOffice Team 2020-10-05 14:26:36 UTC
Created attachment 166092 [details]
The example file modified to hyperlink to a file on my local drive with # in directory name
Comment 10 NISZ LibreOffice Team 2020-10-05 14:27:43 UTC
Created attachment 166093 [details]
The modified example file saved as xlsx - the # breaks the target into two
Comment 11 Commit Notification 2020-10-26 07:55:08 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fc58d7d65b9683db7b7632137126680b8483f6c5

tdf#129969 XLSX export: file URLs need IURI encoding

It will be available in 7.1.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 NISZ LibreOffice Team 2020-11-27 10:34:04 UTC
Verified in:

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 9c355a82881d8e13d6bc732e13b28d62962bf245
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded

Thanks for fixing!
Comment 13 ian.klpoon 2020-12-10 01:27:00 UTC
Dear all,

I have tested with my original problematic file and found that the hyperlink still NOT work in version 7.1.0 Beta 1
The link changed when compared with Version 7.0, but string is duplicated

I am going to try the daily build 7.2 alpha 0 and upload some test file here later
Comment 14 ian.klpoon 2020-12-10 01:50:32 UTC
I tested again with 7.1.0 daily build dated 9 Dec and the results as following

the original hyperlink:
..\AU%202700%20Evaluation%20Record\AU%202700%20Reagent%20Evaluation\UCSFP%20lot%202638.docx

And the absolute path for this showed as
file:///\\ndhlis-cbut018\CBUT018\abc$\2020 folder\#AU 27000\AU 2700 Evaluation Record\AU 2700 Reagent Evaluation\UCSFP lot 2638.docx




After save as xlsx and reopen the file, the link become
%23AU%202700/AU%202700%20Evaluation%20Record/AU%202700%20Reagent%20Evaluation/UCSFP%20lot%202638.docx

And the absolute path for this showed as
file:///\\ndhlis-cbut018\CBUT018\abc$\2020 folder\#AU 2700\AU 270 Inventory\%23AU 2700\AU 2700 Evaluation Record\AU 2700 Reagent Evaluation\UCSFP lot 2638.docx

The file located in 
\\ndhlis-cbut018\CBUT018\abc$\2020 folder\#AU 2700\AU 2700 Inventory
and the hyperlink linked to another folder 
\\ndhlis-cbut018\CBUT018\abc$\2020 folder\#AU 2700\AU 2700 Evaluation Record\AU 2700 Reagent Evaluation

Two file attached.
Comment 15 ian.klpoon 2020-12-10 01:51:04 UTC
Created attachment 168022 [details]
Original file before save
Comment 16 ian.klpoon 2020-12-10 01:51:34 UTC
Created attachment 168023 [details]
The file after save