Opened 7 years ago
Closed 7 years ago
#15985 closed defect (fixed)
Cannot Reach Trac Anchors in Help Browser
Reported by: | Hb--- | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 18.02 |
Component: | Core | Version: | latest |
Keywords: | help | Cc: |
Description (last modified by )
What steps will reproduce the problem?
- Open the Help Browser
- Click on an anchor hyperlink generated by Trac.
What is the expected result?
The help page scrolls to the position of the anchor.
What happens instead?
The error message "Failed to open help page. The target URL is empty." appears.
Please provide any additional information below. Attach a screenshot if possible.
JOSMs wiki pages have two kinds of references to anchors. The first are generated by PageOutline and TOC macros and have the format #anchortarget
. The second kind is generated by Trac alone and has the format wiki/path/pagename#anchortarget
. Please see an example with both kinds in the SandBox on Help/CommandLineOptions in the first paragraph.
The second format does not fit the Regex s.matches("#.*") which wants a #
sign as first character.
I suggest to change the search criteria.
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2018-02-19 01:14:22 +0100 (Mon, 19 Feb 2018) Build-Date:2018-02-19 00:19:27 Revision:13446 Relative:URL: ^/trunk Identification: JOSM/1.5 (13446 en) Windows 7 64-Bit OS Build number: Windows 7 Professional (7601) Memory Usage: 909 MB / 3604 MB (424 MB allocated, but free) Java version: 1.8.0_161-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1280x1024 Maximum Screen Size: 1280x1024 Program arguments: [--language=en, --trace] Dataset consistency test: No problems found Last errors/warnings: - E: Failed to open help page - Failed to open help page. The target URL is empty.
Attachments (0)
Change History (12)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Milestone: | → 18.02 |
---|
comment:4 by , 7 years ago
It is generated by Trac https://josm.openstreetmap.de/wiki/WikiFormatting#SettingAnchors
It is a valid "relative reference" as described in https://tools.ietf.org/html/rfc3986#section-4.2
See https://blog.httpwatch.com/2011/03/01/6-things-you-should-know-about-fragment-urls/
comment:5 by , 7 years ago
@Hb:
Please don't use the SandBox as a storage space. It is a Sandbox and will be cleared completely without warning. Also don't link to it. When you need examples, add a screenshot or the relevant code in the tickets and/or refer the original places of the issues. For debugging purposes we always find solutions to reproduce this ourselves.
follow-up: 10 comment:6 by , 7 years ago
My question is: where is it used in real help pages? To know where I need to click to make it crash.
follow-up: 8 comment:7 by , 7 years ago
Help/Plugin/Wikipedia search "Download from Overpass API" which BTW is badly linked, as <F1> on the wikipedia dialog leads to a nonexisting page instead of the proper help page.
comment:8 by , 7 years ago
Replying to stoecker:
Help/Plugin/Wikipedia search "Download from Overpass API" which BTW is badly linked, as <F1> on the wikipedia dialog leads to a nonexisting page instead of the proper help page.
Thanks. Wikipedia plugin updated in [o34079:34080].
comment:10 by , 7 years ago
Description: | modified (diff) |
---|---|
Keywords: | help added; template_report Help Browser removed |
Replying to Don-vip:
My question is: where is it used in real help pages?
Please see Help/CommandLineOptions, first paragraph.
To know where I need to click to make it crash.
On this issue nothing crashes. The message comes from josm/trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java#L642. Error is that the target is not reached in the help browser. Normal web browsers can handle this unusual references from Trac, see https://trac.edgewall.org/ticket/12981.
comment:11 by , 7 years ago
Ah, so this is an "external link anchor" linking to the current page (Hmm, what's the sense of this...)? Well, my example was one linking to another page.
Yeah, thanks for creating such nicely explained bug reports! :)