[Patch] Locations on Wikidata broken

Issue #106 resolved
Former user created an issue

This simple patch seems to fix the issue:

--- magnusmanske-wikidata-todo-c1b9d6c9d300/public_html/around.html 2018-12-04 11:59:13.000000000 +0100 +++ magnusmanske-wikidata-todo-c1b9d6c9d300.orig/public_html/around.html 2019-02-28 14:01:10.000000000 +0100 @@ -131,7 +131,7 @@ var marker = new OpenLayers.Marker(pos) ; marker.id = v.q ; marker.events.register("click", marker, function() { - var q = 'Q' + v.q ; + var q = '' + v.q ; var title = q ; var desc = '' ; var running = 2 ;

Comments (2)

  1. Petr Kadlec

    Yeah, this is still true: the around.html tool displays all WD items with a double Q, with the main Reasonator link broken in the same way.

    The problem is that the showMap handler prefixes the result from wd.itemFromBinding with an explicit Q, but itemFromBinding (which implementation is terrible, BTW, but I have no idea where does this file come from) returns the whole entity ID, including the Q (or P) prefix, which results in e.g. “QQ42”.

  2. Magnus Manske repo owner

    Remove duplicated Q prefix in around.html

    wd.itemFromBinding returns the entity identifier including the prefix, there is no need to add a second one.

    Fixes #106

    → <<cset d43aa740781a>>

  3. Log in to comment