Page MenuHomePhabricator

#section fragment on page property gone from hyperlink
Closed, ResolvedPublic

Description

Author: info

Description:
Wiki links can have a page section on the end, e.g. [[Main_Page#Topics]].

MediaWiki displays the #section_name in the page text and it is part of the HTML hyperlink so that when you click it your browser takes you to the named subsection anchor:

<a href="/wiki/Main_Page#Topics" title="Main Page">Main_Page#Topics</a>

If you turn such a link to a semantic annotation by prepending with a property name, e.g. [[Test relation::Main_Page#Topics]], then SMW displays the #section_name, but it's gone from the HTML hyperlink:

<a href="/wiki/Main_Page" title="Main Page">Main_Page#Topics</a>

So just by adding an annotation, the wiki link changes HTML and thus behavior. It's really odd to see the fragment on the end of the page name but not to have it in the hyperlink.

Note that neither a MediaWiki link nor an SMW page property stores the #section_name fragment. Some users have asked that SMW support semantic relations between page sections, but that's a separate enhancement. This bug only asks for consistent wiki page HTML after adding annotation.


Version: unspecified
Severity: normal
URL: http://ontoworld.org/wiki/SMW_unit_test:Test_relations#Subsection_links

Details

Reference
bz13244

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:07 PM
bzimport set Reference to bz13244.

Fragments are now preserved for display on the page. They have no semantic relevance -- the Factbox still shows the plain link to clarify that.