Page MenuHomePhabricator

Wikicode in map data is always rendered in enwiki if data is from Sparql
Open, MediumPublic


If mapframe shape comes from Sparql query then the wikicode which comes from the query is rendered in enwiki and not in the wiki where the actual map is.

<mapframe text="text" align="right" width="265" height="250" zoom="14" longitude="25.7342" latitude="62.23766">[
  "type": "ExternalData",
  "service": "geoshape",
  "query": '
      (?item as ?id) 
      (?itemLabel as ?title) 
      (concat("{{SERVERNAME}}<hr>{{CURRENTTIMESTAMP}}<hr>{{Kartographer WLM pin|wikidata=", substr(str(?item),32,250),  "}}") as ?description)  
     ?item wdt:P31/wdt:P279* wd:Q41176 .
     ?item wdt:P276 wd:Q11892928.
     OPTIONAL { ?item wdt:P625 ?coor. }
     SERVICE wikibase:label { bd:serviceParam wikibase:language "fi,sv,en". 
ORDER BY ?itemLabel'


Event Timeline

MSantos claimed this task.
MSantos added a subscriber: MSantos.

Comparing the following links, it seems to be resolved. Please reopen in case I am missing something.

Still broken.

Maybe it is easier to explain with

If you do next:

  1. Open map in
  2. If you look the wikicode in maptest page you see that the content of the popup comes from Template:Kartographer_WLM_pin
  3. There is no Template:Kartographer_WLM_pin in
  4. However when you open the map and click buildings popup will magically work
  5. It is because template is rendered using enwiki and template used is
MSantos triaged this task as Medium priority.Mar 6 2019, 6:05 PM

@Zache, thanks I understand the issue now. I will triage it now considering your comment. If you have more info that you think is useful, please let me know.

Also, the example doesn't work currently because template was deleted in enwiki.

TheDJ added a subscriber: TheDJ.

Confirm that this is still a problem. Kartotherian seems to do all its parsing against, instead of the domain it should be using...

    // TODO: we shouldn't use it directly,
    // but instead refactor out mwapi lib from node_service_template
    // and use the proper host
const mwapi = core.getConfiguration().mwapi_req;
config.mwapi = (mwapi && mwapi.uri) || '';