Modify

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 Hb---)

What steps will reproduce the problem?

  1. Open the Help Browser
  2. 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 Don-vip, 7 years ago

Yeah, thanks for creating such nicely explained bug reports! :)

comment:2 by Don-vip, 7 years ago

Milestone: 18.02

comment:3 by Don-vip, 7 years ago

Where can I find the second format outside of sandbox?

comment:5 by stoecker, 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.

comment:6 by Don-vip, 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.

comment:7 by stoecker, 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.

in reply to:  7 comment:8 by Don-vip, 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:9 by Don-vip, 7 years ago

Mmm it doesn't crash with new version of the plugin?

in reply to:  6 comment:10 by Hb---, 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 stoecker, 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.

comment:12 by Don-vip, 7 years ago

Resolution: fixed
Status: newclosed

In 13457/josm:

fix #15985 - fix handling of relative links in help browser

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.