Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 535106 - Help topics with space in file names no longer work with Photon
Summary: Help topics with space in file names no longer work with Photon
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 4.8 RC3   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-25 05:08 EDT by Pierre-Charles David CLA
Modified: 2018-06-01 03:57 EDT (History)
6 users (show)

See Also:
akurtakov: review+
mistria: review+
Lars.Vogel: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Charles David CLA 2018-05-25 05:08:46 EDT
In Sirius we have several of our help entries [1] which point to local HTML files with space in their names. It's probably not a good practice, but it used to work at least until Oxygen.3. Testing with Photon (at least M6, I've not looked further), all these are now broken and display an empty page with no error message or feedback (not even a "Topic not found").

When hovering the mouse on one of these topic's link in the left panel, I see it point to a URL of this form:

  http://127.0.0.1:41099/help/topic/org.eclipse.sirius.doc/doc/specifier/Sirius%20Specifier%20Manual.html

so with " " quoted as "%20" but "/" left as-is. Following this link it seems I end up being redirected to:

  http://127.0.0.1:41099/help/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Fspecifier%2FSirius%2520Specifier%2520Manual.html

with "/" quoted as "%2F" and the "%" in the original link quoted as "%25". I've tried unquoting parts of the second URL manually in my browser, without success.

On the Sirius side we'll probably rename our files to be safe, but I wanted to make sure this is reported.


[1] https://git.eclipse.org/r/plugins/gitiles/sirius/org.eclipse.sirius/+/master/plugins/org.eclipse.sirius.doc/doc/toc.xml
Comment 1 Dani Megert CLA 2018-05-25 05:16:04 EDT
Alex, could this be caused by newer Jetty version? Maybe a security fix?
Comment 2 Pierre-Charles David CLA 2018-05-25 05:23:09 EDT
(In reply to Dani Megert from comment #1)
> Alex, could this be caused by newer Jetty version? Maybe a security fix?

That was my first thought, but I'm seeing this with a product built on Photon M6 (with org.eclipse.help Version: 2.2.200.v20180124-2000 Build id: I20180124-2000), which uses Jetty 9.4.8.v20171121. The "newer Jetty version" is 9.4.10 right?
Comment 3 Alexander Kurtakov CLA 2018-05-25 05:26:57 EDT
Both Oxygen.3 and Photon M6 have Jetty 9.4.8. It's interesting whether it works with RC1/2?
Comment 4 Dani Megert CLA 2018-05-25 05:35:56 EDT
Did you test both scenarios on the exact same machine?
Comment 5 Pierre-Charles David CLA 2018-05-25 05:49:21 EDT
(In reply to Dani Megert from comment #4)
> Did you test both scenarios on the exact same machine?

Yes, under Linux (but it was first reported both other members of the Sirius team who are under Windows).

On the same machine I see the problem both with a package built on Photon M6 (Jetty 9.4.8) and Photon M7 (Jetty 9.4.10).

I just tested with an earlier version of our product, based on Oxygen.3 (uses Jetty 9.4.5): it still works, but I notice a difference in the URLs:

In the navigator panel, the "original" link is of the same form: http://127.0.0.1:43613/help/topic/org.eclipse.sirius.doc/doc/specifier/Sirius%20Specifier%20Manual.html?cp=15_2

When pasting this in an external browser, I end up at http://127.0.0.1:43613/help/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Fspecifier%2FSirius+Specifier+Manual.html&cp=15_2

i.e. the spaces, quoted as "%20" in the original link, have become "+".

Using my Photon M7 based product (which redirects me to the broken URL when following the navigator's links), the form of URL works!
Comment 6 Pierre-Charles David CLA 2018-05-25 08:27:03 EDT
FWIW, replacing the space characters in the toc.xml links by "+" works around the problem for direct links, i.e.

- <topic href="doc/user/Sirius User Manual.html" label="Sirius User Manual">
+ <topic href="doc/user/Sirius+User+Manual.html" label="Sirius User Manual">

However, this is not a complete workaround because links inside the HTML files to images with space in their paths are also broken. For example we have:

  <img src="images/Sirius - High-Level Architecture Overview.png"/> 

which shows up as-is in the source of the frame in the browser, but results in a broken image. Following the link redirects to the broken URL:

http://127.0.0.1:36195/help/topic/org.eclipse.sirius.doc/doc/developer/images/Sirius%20-%20High-Level%20Architecture%20Overview.png

(the version with "Sirius+-+High-Level+Architecture+Overview.png" resolves correctly).
Comment 7 Eclipse Genie CLA 2018-05-25 12:18:12 EDT
New Gerrit change created: https://git.eclipse.org/r/123356
Comment 8 Dani Megert CLA 2018-05-25 12:34:26 EDT
(In reply to Eclipse Genie from comment #7)
> New Gerrit change created: https://git.eclipse.org/r/123356

Can you tell us what broke it?
Comment 9 Mat Booth CLA 2018-05-25 13:00:13 EDT
(In reply to Dani Megert from comment #8)
> (In reply to Eclipse Genie from comment #7)
> > New Gerrit change created: https://git.eclipse.org/r/123356
> 
> Can you tell us what broke it?

It looks to me like the problem appeared between Photon M3 and Photon M4.

However, the line Lucas removed here was added to fix bug 290147 a long long time ago.

Was something fixed elsewhere between M3 and M4 that made this line no longer necessary?
Comment 10 Mat Booth CLA 2018-05-25 13:02:44 EDT
(In reply to Mat Booth from comment #9)
> Was something fixed elsewhere between M3 and M4 that made this line no
> longer necessary?

Bug 497510 looks a likely candidate...
Comment 11 Mat Booth CLA 2018-05-25 13:22:50 EDT
Yep, I can confirm that reverting the fix for bug 497510 (see [1]) makes this problem disappear.

If I were to make a wild stab-in-the-dark guess, I would say Lucas' fix is correct -- the line he's removed was probably covering up the defect in Equinox for a long time :-)

[1] http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=ea94523fefb5b36def9cda1062495008e47b4795
Comment 12 Dani Megert CLA 2018-05-27 11:53:20 EDT
NOTE: 4.8 development must go into R4_8_maintenance.
Comment 13 Eclipse Genie CLA 2018-05-28 05:07:34 EDT
New Gerrit change created: https://git.eclipse.org/r/123426
Comment 15 Dani Megert CLA 2018-05-28 08:39:33 EDT
Alex, you marked it FIXED. How do you keep track of the master fix which is still open?
Comment 16 Alexander Kurtakov CLA 2018-05-28 08:41:31 EDT
(In reply to Dani Megert from comment #15)
> Alex, you marked it FIXED. How do you keep track of the master fix which is
> still open?

Gerrit is my primary bookkeeping so I won't lose it :).
Comment 17 Pierre-Charles David CLA 2018-05-28 08:57:59 EDT
Thanks for the quick fix. I mentioned earlier that we would rename our files just to be safe, but actually this would break all existing hyperlinks (for example from posts on our forum) to the version of our doc published on the web (http://www.eclipse.org/sirius/doc/). I'll keep an eye on this and check with RC3, but we'll probably not change our file names.
Comment 18 Alexander Kurtakov CLA 2018-05-28 09:00:51 EDT
(In reply to Pierre-Charles David from comment #17)
> Thanks for the quick fix. I mentioned earlier that we would rename our files
> just to be safe, but actually this would break all existing hyperlinks (for
> example from posts on our forum) to the version of our doc published on the
> web (http://www.eclipse.org/sirius/doc/). I'll keep an eye on this and check
> with RC3, but we'll probably not change our file names.

Even if you don't do it for existing. Please keep it in mind for the future to not add such :). URIs with spaces are really bad idea.
Comment 20 Eclipse Genie CLA 2018-06-01 03:44:56 EDT
New Gerrit change created: https://git.eclipse.org/r/123788
Comment 21 Eclipse Genie CLA 2018-06-01 03:45:15 EDT
New Gerrit change created: https://git.eclipse.org/r/123792
Comment 22 Lars Vogel CLA 2018-06-01 03:57:16 EDT
(In reply to Eclipse Genie from comment #21)
> New Gerrit change created: 

https://git.eclipse.org/r/123792
https://git.eclipse.org/r/123788

Please ignore, this was due to an error.