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

Zache created this task.Jun 22 2017, 5:42 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 22 2017, 5:42 AM
Zache updated the task description. (Show Details)Jun 22 2017, 5:43 AM
MSantos closed this task as Resolved.Mar 6 2019, 5:10 PM
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.

Zache added a comment.Mar 6 2019, 5:34 PM

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
Zache reopened this task as Open.Mar 6 2019, 5:34 PM
MSantos triaged this task as Medium priority.Mar 6 2019, 6:05 PM
MSantos moved this task from Needs triage to Backlog on the Product-Infrastructure-Team-Backlog board.

@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.

Zache added a comment.Mar 8 2019, 7:31 AM

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...

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptApr 13 2020, 2:14 PM
TheDJ added a comment.Apr 13 2020, 2:17 PM
    // 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) || '';

MSantos removed MSantos as the assignee of this task.Aug 26 2020, 8:15 AM