Page MenuHomePhabricator

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

Description

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": '
   SELECT DISTINCT 
      (?item as ?id) 
      ?itemLabel 
      (?itemLabel as ?title) 
      (concat("{{SERVERNAME}}<hr>{{CURRENTTIMESTAMP}}<hr>{{Kartographer WLM pin|wikidata=", substr(str(?item),32,250),  "}}") as ?description)  
  WHERE {
     ?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'
}

]</mapframe>

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

If you do next:

  1. Open map in mediawiki.org
  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 mediawiki.org
  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 https://en.wikipedia.org/wiki/Template:Kartographer_WLM_pin
Zache reopened this task as Open.Mar 6 2019, 5:34 PM
MSantos triaged this task as Normal 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.