Page MenuHomePhabricator

New map preview with geojson is broken
Closed, ResolvedPublic

Description

On en.wikivoyage, go to your sandbox, start creating a new page, paste the text below, and hit PREVIEW. Notice that even though the map shows, it has no geojson marker. Debug console shows the error below. Note that it works ok after saving the page.

<mapframe latitude="24.3" longitude="74.4" zoom="5" width="400" height="400" group="cities" show="parks,zoos">
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
          "description": "[[File:GANDHI ASHRAM 03.jpg|Gandhi Ashram|280px|link=]] Not only is [[Ahmedabad]] the commercial and business capital of [[Gujarat]] and one of the fastest developing cities in Asia. It is a centre for information technology, education and industry. Bhadra Fort, Shaking Minarets, Gandhi Ashram and Teen Darwaza are a few of the main historical sites of the city",
          "title": "[[Ahmedabad]] ([[w:Ahmedabad|Ahmedabad]]) &mdash; commercial and business capital of [[Gujarat]].",
          "marker-symbol": "city",
          "marker-size": "medium",
          "marker-color": "#33a2ff"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          72.57136,
          23.02251
        ]
      }
    }
  ]
}
</mapframe>
with debug
VM1622:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0

(anonymous function)           @ kartographer.js?f498e:312
fire                           @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=m7F5ikBY:3148
self.fireWith                  @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=m7F5ikBY:3260
deferred.(anonymous function)  @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=m7F5ikBY:3350
(anonymous function)           @ api.js?10e9f:256
fire                           @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=m7F5ikBY:3148
self.fireWith                  @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=m7F5ikBY:3260
done                           @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=m7F5ikBY:9314
callback                       @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=m7F5ikBY:9718

Event Timeline

Yurik created this task.May 17 2016, 7:17 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 17 2016, 7:17 PM
Yurik triaged this task as High priority.May 17 2016, 7:19 PM
Yurik added a project: Maps.
Yurik updated the task description. (Show Details)
Restricted Application added a project: Discovery. · View Herald TranscriptMay 17 2016, 7:19 PM

Change 289579 had a related patch set uploaded (by JGirault):
Fix preview failure because of missing map data.

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

Change 289579 merged by jenkins-bot:
Fix preview failure because of missing map data.

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

MaxSem closed this task as Resolved.May 20 2016, 10:42 PM
MaxSem assigned this task to JGirault.