Writer hyperlink to the bookmark in filename with # (sharp) character doesn't distinguish # in the filename from # which is a separator for bookmark.
Steps to Reproduce:
1.make .odt file with the filename which include "#" character.
2.make bookmark in the above file.
3.open another .odt and make hyperlink to the above bookmark.
Insert Hyperlink dialogbox opens sub dialogbox titled 'Target in document' with a msg 'couldn't open the document'.
Normally, it should just have made a hyperlink to the bookmark in .odt.
User Profile Reset: No
But just after I upgraded Ubuntu 14.* to 16.04, 'coultn't open the document' error occurs.
Cannot confirm it. Hyperlink is correctly created and works in Version: 188.8.131.52.alpha0+ (x64)
Build ID: d73857e7d7f6a5bf38c6a2f396832faabaef65e2
CPU threads: 8; OS: Windows 10.0; UI render: GL;
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2017-12-12_17:37:14
Locale: de-DE (de_DE); Calc: CL
Does the hyperlink to the document, which is created in the hyperlink dialog, has a %23 instead of the # in the file name? That is needed and works on Windows.
Hi Regina Henschel,
Of course '#', not '%23' or anything. I made a file of which filename is 'true#333.odt' and made a bookmark in it named 'testbookmark' by alt-i, k.
And I made another file named 'test.odt'and made a hyperlink on the text 'testhyperlink' by selecting it and ctrl-k to point to the above 'testbookmark' in 'true#333.odt'. But after choosing 'true#333.odt' if u try to click the bookmark selection icon (crossbar over the circle), it would not display bookmark list of 'true#333.odt' but the error msg 'Couldn't open the document'.
If u force it by filling the text box with 'testbookmark' by hand-typing, it will pass anyway. But the hyperlink doesn't work and if u edit the hyperlink again it will show the filename field with 'true' and the bookmark field with '#333.odt#testbookmark'.
It means Libreoffice is confusing the bookmark separator '#' with the letter '#' in the filename.
As mentioned already, this happened just after upgraded from Ubuntu 14 to Ubuntu 16.04 which was fresh installed on the empty HDD. Unfortunately I don't know the version number of Libreoffice which I used to use in Ubuntu 14 which was erased permanently. And I used this kind of hyperlink-bookmark for years without this kind of problem.
Created attachment 138514 [details]
Screenshot of hyperlink-dialog
Please compare my screenshot from Windows with yours. If I mark the text in the document and press CTRL+k I get the Hyperlink-dialog. Next I click on icon "Document" and then on the icon "Open file" top-right. I choose my file "Kannweg#Bookmark.odt"; you see the path in the "Path" field. It has a # in the file name. But below the field "Target" at the label URL you see, how the path is written in UNC notation. Notice the change of # to %23.
Perhaps you can add the analogous screenshot for your environment. I suspect, that it might be a Ubuntu only problem.
And please have a look in Help > About, which LibreOffice version do you have. The current productive version is 5.3.7. Perhaps you need to update your LibreOffice.
Created attachment 138517 [details]
Attached my dialogbox. Plz check. (My mistake to hava attached in the previous comment)
Different from your case, my Libreoffice preserve "#" character (not converted into %23 ASCII code convention).
FYI, I updated my Libreoffice to Version: 184.108.40.206 Build ID: 1:5.4.3~rc2-0ubuntu0.16.04.1~lo1.
In contrast to Windows you have already an UNC notation in the Path field. Therefore I would try to manually replace the # with %23 in the Path field before going to select the bookmark.
Do you use the system file picker dialog? You can try to switch to LibreOffice dialogs or vs in Tools > Options > General.
Unfortunately I have no Linux and cannot test it there. So I cannot set the issue to New. I have tried older Windows versions as well. Non of them get the path wrong.
Created attachment 138540 [details]
Thank you for your kind advise.
Please see the attached screen shot I made.
I found out that when I click the recent files icon (the read arrow is pointing in the attached image) and choose the target file the '#' character remains as it is so that Libreoffice confuses '#' in filename with '#' as a hyperlink separator, but if I click the browser icon (the green arrow is pointing) and choose the target file '#' is converted to '%23' and everything goes OK.
This is a very strange thing because I hardly click the file browser icon in this job and I got the problem as soon as I upgraded to Ubuntu 16.04 from 14. (though don't know the change of Libreoffice versions)
PS. It turned out there's nothing to do with this problem between 'libreoffice dialogs' and 'ubunto file browser dialog'.
I think, that it is not a bug, if the list contains items, which are unsuitable, because you can enter, what ever you want.
But I think, that the problem with special characters in a path should be explained somewhere. Currently I see no hint in the help texts. Therefore I change the component to Documentation.
The current text in topic "Document" is:
Enter a URL for the file that you want to open when you click the hyperlink. If you do not specify a target frame, the file opens in the current document or frame."
Here should a hint to the browse button be added and a hint, that special characters in a path has to be %-escaped and that this will be done automatically by selecting the file via file picker via browse-button.
> I think, that it is not a bug, if the list contains items, which are
> unsuitable, because you can enter, what ever you want.
It might be a bug since in the previous version I hadn't had this problem for years while doing the same job.
> But I think, that the problem with special characters in a path should be
> explained somewhere. Currently I see no hint in the help texts. Therefore I
> change the component to Documentation.
That is a good idea. But it's like moving the problem to the users from the Libreoffice embedded code mistakes. If the user could choose the recent accessed file from the file list which Libreoffice provided, Libreoffice should convert '#' character to %-escaped one automatically as it used to do that for years.
Cannot reproduce. Followed STR. Able to make a Hyperlink to a file with # in filename. Only tested with Windows.
If it also works in Linux, then I propose that this bug should be closed as WFM -- no need to change the documentation.
Version: 220.127.116.11.alpha0+ (x64)
Build ID: 368c56144aab5794c39d5bc2082d9b3d6d7cebdb
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL: win
Locale: en-CA (en_DK); UI: en-GB
I tried this also in
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
The link is like this: file:///home/user/Desktop/true%23333.odt
#333 was transformed in %23333, but the link is working as expected
(In reply to BogdanB from comment #11)
> The link is like this: file:///home/user/Desktop/true%23333.odt
> #333 was transformed in %23333, but the link is working as expected
Same result in Windows. The # is represented as %23, and hyperlink works.
Thanks for checking Bogdan.
(fwiw, if the Document Path in the hyperlink dialog is edited manually (to change %23 to #), then an error message appears when clicking on the hyperlink -- but that was not the topic of this bug report).
(In reply to Harry from comment #0)
> Expected Results:
> Normally, it should just have made a hyperlink to the bookmark in .odt.
Based on comment 10 and comment 11 -- this is what happens now in both Windows and Linux. Closing as WORKSFORME, with no need for documentation change.