Community
Participate
Working Groups
Build Identifier: Any named anchors are stripped from InfoCenter URLs, when such a URL is entered in the browser address bar. I would swear that URLs that included anchors used to work for InfoCenters based on earlier versions of Eclipse. However, in our current Eclipse 3.6-based InfoCenters, we can no longer link to the page anchor level from the browser address bar. To be clear, the following uses of page anchors do work fine in our InfoCenters: -- hyperlinks with named anchors within a page to sections of the same page -- hyperlinks with named anchors on one page to another page+section in the same InfoCenter What's failing is this: -- hyperlinks with named anchors copied to the browser address bar The anchor gets stripped, and only the top of the referenced page is opened. This is true in Firefox 4, IE 9, and Chrome 10 on Windows 7, and in Firefox 3.6.16 on Ubuntu 10.10. This failure means our users cannot bookmark to the page section level, and our support people cannot email reliable InfoCenter URLs to page sections. Possibly related is the following curious behavior: URL-encode the "#" in an InfoCenter URL with %23, and only the referenced page opens (that is, without the InfoCenter frames), but still only to the top of the page. Reproducible: Always Steps to Reproduce: Since we publish our documentation in both InfoCenter and website formats, compare the following URLs. Both should open with the unzip() function at the top of the page. http://streambase.com/developers/docs/latest/reference/expressions.html#expressions_unzip_function http://docs.streambase.com/latest/topic/com.streambase.sb.ide.help/data/html/reference/expressions.html#expressions_unzip_function
I'm pretty sure that creating a bookmark from a help page which included an anchor as part of the URL has never worked. The reason for this is that the anchor is not passed to the server. It is handled by the web client and applies only to the outermost frame of the help system. The syntax below must be used to create a bookmark to an anchor within a help page. http://docs.streambase.com/latest/index.jsp?topic=/com.streambase.sb.ide.help/data/html/reference/expressions.html&anchor=expressions_unzip_function
The help server should either rewrite the anchors in relative links, or maybe the index.jsp could get some smartness to forward the anchor to the embedded frame. Example in Helios docs: http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/gettingStarted/qs-Quickviews.htm On this page, there's a link "Type Hierarchy section" with href="qs-6.htm#quick_type_hierarchy". The anchor works when I open the link in place, but it is stripped away when I try to open it in a new tab or copy the link.
The help server does not get to see anchors which are pasted into the address bar. Anchors are always interpreted by the web client and are not passed to the server.
OK, then I guess the redirection should be made a bit smarter. Here's an idea how to preserve the anchor using a redirection page that saves a cookie with the anchor: http://forum.springsource.org/showthread.php?101421-Preserving-URL-anchor-when-redirecting
(In reply to comment #4) > OK, then I guess the redirection should be made a bit smarter. Here's an idea > how to preserve the anchor using a redirection page that saves a cookie with > the anchor: > http://forum.springsource.org/showthread.php?101421-Preserving-URL-anchor-when-redirecting What's the chance for getting a fix to this?
Created attachment 202626 [details] Patch I figured out how to fix this by reading the anchor in JavaScript and converting it to a parameter which would get passed to the server when index.jsp was loaded from JavaScript.
Patch has been committed to Git master, Fixed.