Page MenuHomePhabricator

Maps that contain Wikidata ids and are stored on Commons fail to display when called via <maplink> or <mapframe>
Open, MediumPublic


If a .map contains a Wikidata id, the entire map will fail to display when called via <maplink> or <mapframe>. This page demonstrate the problem.

NOTE: the Collaboration Team has prioritized this item for action as part of Map Improvements 2018, but there is concern that we don't know how difficult the task might prove. Our intention is to investigate and, if fixing proves too hard, fall back to some other remediation that will warn the user or somehow fail gracefully.

Event Timeline

Gareth created this task.Jan 22 2017, 11:39 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 22 2017, 11:39 AM
debt closed this task as Declined.Jan 27 2017, 12:47 AM
debt added a subscriber: debt.

Hi @Gareth - it appears that you're missing the lat/lng in your map sample. Please refer to this page for mapframe samples with wikidata.

JGirault reopened this task as Open.Jan 27 2017, 1:13 AM
JGirault added a subscriber: JGirault.

@debt This is a valid bug, I'm reopening it.

The problem here isn't missing latitude/longitude (which are unofficially optional).
The problem here is the ExternalData chain is not respected:

  • Our data loader is able to retrieve External Data from Commons or from the Geoshape/line/mask service.
  • Once the data is retrieved, it is considered valid GeoJSON. But in this instance, we are getting invalid GeoJSON with ExternalData, meaning the script should parse that and make another series of API call to the Geoshape/line/mask service in order to retrieve valid GeoJSON.

It could be considered a limitation (kind of frustrating though), or rather it could be limited to some extent: we do not want to loop over the data infinitely. What if a data page on Commons loads another data page on Commons and so on? We don't want this to happen.

Anyway, if we decide to support this to some extent, we need to make improvements to the wikimedia-mapdata script.

debt added a comment.Jan 27 2017, 1:18 AM

Gotcha, cool and thanks, @JGirault :)

debt triaged this task as Medium priority.Oct 18 2017, 2:50 PM
debt added a project: Maps-Sprint.
debt added subscribers: Yurik, Evad37.

Moving to the sprint board, as we have a couple other related issues that this issue might be able to piggy-back onto as community work is being done: T178370 and T178321

jmatazzoni updated the task description. (Show Details)
Abbe98 added a subscriber: Abbe98.May 1 2018, 12:43 PM
This comment was removed by Abbe98.

@Mholloway, we discussed this in today's Discussion Meeting (which was a kind of maps triage meeting). As per the "Note" at the top in blue, what have you learned about this task? Will we plan to fix it or to warn users?

Mholloway added a comment.EditedJun 5 2018, 5:47 PM

@JGirault's analysis is accurate, and I think fixing this is a complicated enough undertaking to be beyond the scope of Map Improvements 2018. That said, we could provide better error messages about what's going on, and update the docs to clarify the current inability to load chained ExternalData.

Mholloway moved this task from Backlog to To-do on the Maps-Sprint board.Jul 3 2018, 4:59 PM
Mholloway removed Mholloway as the assignee of this task.Jul 3 2018, 7:19 PM
Mholloway removed a project: Maps-Sprint.
Mholloway added a subscriber: Mholloway.
TheDJ added a subscriber: TheDJ.Jul 7 2018, 8:18 AM

Are we sure this is just with wikidata ids etc ? I see something like this with even a simple .map page

<mapframe width=300 height=300 zoom=17>
  "type": "ExternalData",
  "service": "page",
  "title": "Haarlem/Grote"

Rendered on nl.wp, as if it is located in Algeria instead of in Utrecht, Netherlands

@TheDJ It sounds like you are describing a different problem (and one I can't reproduce). Do you have a page published that demonstrates this?

To your broader point, I think you are correct that the problem in this task doesn't turn on the presence or absence of Wikidata IDs; I think this is a specific example of the general problem that the map loader can't handle chained ExternalData references, and if present they will prevent the map from loading at all.

Glrx added a subscriber: Glrx.Dec 20 2018, 10:38 PM
LGoto assigned this task to MSantos.Jul 3 2019, 3:59 PM
MSantos removed MSantos as the assignee of this task.Jul 31 2019, 3:31 PM
mxn added a subscriber: mxn.Mar 26 2020, 2:01 AM
Kozuch added a subscriber: Kozuch.Aug 25 2020, 5:05 PM