Bug 54204 - Hyperlinks between documents not works if link contains anchor at the end
Summary: Hyperlinks between documents not works if link contains anchor at the end
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.2 release
Hardware: Other Windows (All)
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:6.4.0
Keywords: bibisectRequest, regression
Depends on:
Blocks: XLS XLSX-Hyperlink Hyperlink-Calc
  Show dependency treegraph
 
Reported: 2012-08-29 12:14 UTC by Kirill
Modified: 2019-11-13 07:59 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
step 1 (3.21 KB, image/png)
2012-10-09 05:54 UTC, Kirill
Details
screenshots (172.50 KB, application/x-7z-compressed)
2012-10-09 05:55 UTC, Kirill
Details
screenshots (175.45 KB, application/zip)
2012-10-09 06:01 UTC, Kirill
Details
test case xlsx (9.20 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2013-03-18 05:52 UTC, sasha.libreoffice
Details
test case xls (24.00 KB, application/vnd.ms-excel)
2013-03-18 05:52 UTC, sasha.libreoffice
Details
Document, to which link is done. Was placed in D:\1\ (8.27 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2013-03-18 05:55 UTC, sasha.libreoffice
Details
LO_calc_malformed_xls_sheets.zip (2.71 KB, application/zip)
2017-09-30 14:00 UTC, Stéphane Aulery
Details
sample_20181029.zip (97.04 KB, application/zip)
2018-10-29 15:02 UTC, Stéphane Aulery
Details
Example xlsx file from Excel with hyperlinks and anchors (16.14 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-06-21 12:21 UTC, Gabor Kelemen (allotropia)
Details
Example xlsx used as target (16.37 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-06-21 12:22 UTC, Gabor Kelemen (allotropia)
Details
Excel tries to open the hyperlink with anchor (42.87 KB, image/png)
2019-06-21 12:26 UTC, Gabor Kelemen (allotropia)
Details
LO tries to open the hyperlink with anchor (20.83 KB, image/png)
2019-06-21 12:28 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill 2012-08-29 12:14:42 UTC
LibreOffice fails with error 'path do not exists' when I trying to use hyperlink to other document (in documents XLS and XLSX)
Comment 1 Kirill 2012-08-29 12:39:30 UTC
Problem appears only if file names contains cyrillic symbols.
Comment 2 Jean-Baptiste Faure 2012-09-01 09:13:28 UTC
Please provide a step by step scenario to reproduce the problem.
Please attach files showing the problem.

Best regards. JBF
Comment 3 Roman Eisele 2012-09-12 12:54:24 UTC
This is a “Spreadsheet” issue (Calc).
Comment 4 Kirill 2012-10-09 05:54:38 UTC
Created attachment 68312 [details]
step 1
Comment 5 Kirill 2012-10-09 05:55:59 UTC
Created attachment 68313 [details]
screenshots
Comment 6 Kirill 2012-10-09 05:58:31 UTC
In an attachment problem.7z archive contains a number of screenshots that describe the sequence of steps leading to the error. It is worth noting that the error appears only if a link to a specific sheet / cell in a book
Comment 7 Kirill 2012-10-09 06:01:17 UTC
Created attachment 68314 [details]
screenshots

sorry reattached in zip
Comment 8 Kirill 2012-11-06 09:28:17 UTC
Greetings. Please tell me about situation with my bugreport
Comment 9 A (Andy) 2013-03-16 10:47:44 UTC
@sasha: Unfortunately, I can not reproduce it on my computer, because of missing Russian settings.  Because Kirill has unfortunately not yet received a feedback, can you maybe take a look at this issue?

Or can anybody else with Russian computer settings also confirm this bug?
Comment 10 sasha.libreoffice 2013-03-18 05:52:03 UTC
Created attachment 76670 [details]
test case xlsx
Comment 11 sasha.libreoffice 2013-03-18 05:52:58 UTC
Created attachment 76671 [details]
test case xls
Comment 12 sasha.libreoffice 2013-03-18 05:55:39 UTC
Created attachment 76672 [details]
Document, to which link is done. Was placed in D:\1\
Comment 13 sasha.libreoffice 2013-03-18 06:10:47 UTC
Reproduced in 3.4.2, 3.5.0, 4.0.1 on Windows XP 32 bit
3.5.0 shows percent characters instead of Cyrillic characters as shown in attached 9.png, all other show error message correctly. But all not working. Tested with xlsx and xls files.
Additional investigations indicates that problem is not with Cyrillic characters, bug with anchor at the end of link. For example link is asdf.xlsx#qwer!A1
It not works in LO, but in msExcel 2010 it works. But when we remove #qwer!A1 at the end, then it begin working in LO.
Comment 14 QA Administrators 2015-02-19 15:48:40 UTC Comment hidden (obsolete)
Comment 15 A (Andy) 2015-02-20 20:27:42 UTC
Reproducible with LO 4.4.0.3, Win 8.1
Comment 16 Jean-Baptiste Faure 2015-02-21 10:46:46 UTC
XLS and XLSX spreadsheet only. Summary updated accordingly.

Best regards. JBF
Comment 17 tommy27 2016-04-16 07:23:53 UTC Comment hidden (obsolete)
Comment 18 QA Administrators 2017-05-22 13:24:18 UTC Comment hidden (obsolete)
Comment 19 Stéphane Aulery 2017-09-30 14:00:41 UTC
Created attachment 136637 [details]
LO_calc_malformed_xls_sheets.zip
Comment 20 Stéphane Aulery 2017-09-30 14:09:34 UTC
I can't reproduce with LO 5.4.1. Seems fixed.
Comment 21 QA Administrators 2018-10-01 02:53:03 UTC Comment hidden (obsolete)
Comment 22 Stéphane Aulery 2018-10-29 14:40:18 UTC
The bug is reproducible with LO 6.0.6.2 x64 on Windows 7.
Comment 23 Stéphane Aulery 2018-10-29 15:02:24 UTC
The bug is raised only if a document has non ASCII characters in its name and an anchor is used in the hyperlink dialog.

You don't need to use cyrillics characters to reproduce, just an "é" is usefull, and it's broken with any format.

It's seems that when an anchor is used, the link is badly url-encoded, and whithout anchor, no url-encoding is applied, and it's working better.

How to reproduce :

1. Create a document with a "é" character in its filename.
2. Create an other document.
3. Insert two Hyperlink to the first document without anchor.
4. Insert two Hyperlink to the first document with an anchor to its first sheet.
5. Ctrl+click on the first link.
6. Ctrl+click on the second link.

You will see that the first link is working and the second is broken.

An full example is given in sample_20181029.zip attachment.
Comment 24 Stéphane Aulery 2018-10-29 15:02:55 UTC
Created attachment 146140 [details]
sample_20181029.zip
Comment 25 Stéphane Aulery 2018-10-29 15:23:31 UTC
Test with LO 3.3.3.1/portable, this bug was not present.
Comment 26 Stéphane Aulery 2018-10-29 15:37:29 UTC
with LO 6.0.6.2 on windows 7 :

I can't reproduce if I make a link in a writer document to a calc document.

I can reproduce if I make a link in a calc document to a calc document.
Comment 27 Gabor Kelemen (allotropia) 2019-06-21 12:10:53 UTC
A few observations:
Excel can create hyperlinks to other xlsx files and even make them point to a cell on a sheet.
But: when one click on such a hyperlink Excel opens the file and does not consider the sheet and cell reference part.
LO tries to open the whole hyperlink, but it's not possible to pass that information. Instead it gives a warning.
If the hyperlink contains only a target file name then Calc can open it, even if it contains accented characters.
Comment 28 Gabor Kelemen (allotropia) 2019-06-21 12:21:57 UTC
Created attachment 152339 [details]
Example xlsx file from Excel with hyperlinks and anchors
Comment 29 Gabor Kelemen (allotropia) 2019-06-21 12:22:27 UTC
Created attachment 152340 [details]
Example xlsx used as target
Comment 30 Gabor Kelemen (allotropia) 2019-06-21 12:26:20 UTC
Created attachment 152342 [details]
Excel tries to open the hyperlink with anchor
Comment 31 Gabor Kelemen (allotropia) 2019-06-21 12:28:53 UTC
Created attachment 152343 [details]
LO tries to open the hyperlink with anchor
Comment 32 Gabor Kelemen (allotropia) 2019-06-21 12:33:01 UTC
All in all: we should just drop the sheet/cellref part of the hyperlink when the user clicks on it.
Comment 33 László Németh 2019-11-11 10:29:59 UTC
Modified platform "All" to "Windows", because there is no problem under Linux with the following test:

The attached test file "Example xlsx file from Excel with hyperlinks and anchors" https://bugs.documentfoundation.org/attachment.cgi?id=152339,
with the attached target test file "Example xlsx used as target" https://bugs.documentfoundation.org/attachment.cgi?id=152340, renamed as "Tükörfúrógép.xlsx" after downloading.
Comment 34 Commit Notification 2019-11-12 21:24:38 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/739e6aa3b3cff6d63901f253e145b65a2fef2682

tdf#54204 File URLs with fragment need toIUri conversion

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.