Page MenuHomePhabricator

<mapframe>/<maplink>: Invalid GeoJSON code in wgKartographerLiveData prevents drawing of maps at Wikivoyage
Closed, ResolvedPublic

Description

If an article at Wikivoyage contains no markers (i.e. maplink codes with GeoJSON) an invalid GeoJSON code is created for the wgKartographerLiveData variable in the document header.

Working example (with text markers):
"wgKartographerLiveData":{"mask":[{"type":"Feature","geometry":{"coordinates":[[[36000,-180],[36000,180],...

Invalid GeoJSON, for instance at voy:en:Marshfield_(Massachusetts):
"wgKartographerLiveData":[[],[],[],[],[],[],[],[],[],[],[],[],[],[],...

The MediaWiki:Kartographer.js is not able to handle this code, and a JS error message like "Uncaught SyntaxError: Unexpected token u in JSON at position 0" occurs.

The effect of this faulty code is surely that the Kartographer map is not shown at all (empty space).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@RolandUnger thanks for reporting. We have done a number of data-related changes on the backend in the past two weeks, but it won't be deployed until Wednesday. Could you verify that this bug still exists at https://en.wikivoyage.beta.wmflabs.org/wiki/Mapframe ? I suspect we might have fixed it, but not sure.

@RolandUnger I tried to replicate that article with all of its templates at beta cluster, and it seems to be working ok. I will wait until Wednesday to re-visit this bug.

Today, all wgKartographerLiveData are wrong as shown below and, therefore, no map is shown.

"wgKartographerLiveData":[[],[],[],[],[],[],[],[],[],[],[],[],[],[],...

@RolandUnger the train runs at 19:00 UTC today, 12:00 PDT. That's when group1 sites (Wikivoyage) get the new update. See schedule at https://wikitech.wikimedia.org/wiki/Deployments

Lets revisit this after the train runs (assuming the deployment train is ok, and there are no overall deployment issues). Another good place to see the status is at https://tools.wmflabs.org/versions/ -- we are waiting for 1.28.0-wmf.23 in group 1

MaxSem moved this task from Backlog to In progress on the Maps-Sprint board.
MaxSem subscribed.

Still reproduceable.

The wrong wgKartographerLiveData GeoJSON code is still existent.

"wgKartographerLiveData":[[],[],[],[],[],[],[],[],[],[],[],[],[],[],...

Change 318435 had a related patch set uploaded (by MaxSem):
Fix missing live groups in Wikivoyage mode

https://gerrit.wikimedia.org/r/318435

Change 318435 merged by jenkins-bot:
Fix missing live groups in Wikivoyage mode

https://gerrit.wikimedia.org/r/318435