Page MenuHomePhabricator

"Uncaught TypeError: Cannot read property 'call' of undefined" when using 'Edit layer' option
Closed, ResolvedPublic

Description

Found in betalabs and testwiki (wmf.22)

  1. Insert mapframe element on a page - e.g.
<mapframe text="San Francisco museums" width=350 height=350 zoom=13 latitude=37.8013 longitude=-122.3988>
{
  "type": "Feature",
  "geometry": { "type": "Point", "coordinates": [-122.3988, 37.8013] },
  "properties": {
    "title": "[[wikipedia:Exploratorium|Exploratorium]]",
    "description": "[[File:Giant_Mirror_at_the_Exploratorium.jpeg|200px]]",
    "marker-symbol": "museum",
    "marker-size": "large",
    "marker-color": "0050d0"
  }
}
</mapframe>
  1. In VE start editing maps and add some layer elements via 'Draw a marker'.
  1. Click on 'Edit layer' option and then inside the outline of the inserted marker - the following Console error will be displayed:

load.php?debug=false&lang=en&modules=ext.kartographer.box%2Cdata%2Csettings%2Csite%2Cstyle|ext.kartographer.lib.topojson|mapbox&skin=vector&version=0pz8gcz:46 Uncaught TypeError: Cannot read property 'call' of undefined
    at NewClass.fire (load.php?debug=false&lang=en&modules=ext.kartographer.box%2Cdata%2Csettings%2Csite%2Cstyle|ext.kartographer.lib.topojson|mapbox&skin=vector&version=0pz8gcz:46)
    at NewClass._fireDOMEvent (load.php?debug=false&lang=en&modules=ext.kartographer.box%2Cdata%2Csettings%2Csite%2Cstyle|ext.kartographer.lib.topojson|mapbox&skin=vector&version=0pz8gcz:85)
    at NewClass._handleDOMEvent (load.php?debug=false&lang=en&modules=ext.kartographer.box%2Cdata%2Csettings%2Csite%2Cstyle|ext.kartographer.lib.topojson|mapbox&skin=vector&version=0pz8gcz:84)
    at HTMLDivElement.handler (load.php?debug=false&lang=en&modules=ext.kartographer.box%2Cdata%2Csettings%2Csite%2Cstyle|ext.kartographer.lib.topojson|mapbox&skin=vector&version=0pz8gcz:94)
fire @ load.php?debug=false&lang=en&modules=ext.kartographer.box%2Cdata%2Csettings%2Csite%2Cstyle|ext.kartographer.lib.topojson|mapbox&skin=vector&version=0pz8gcz:46
_fireDOMEvent @ load.php?debug=false&lang=en&modules=ext.kartographer.box%2Cdata%2Csettings%2Csite%2Cstyle|ext.kartographer.lib.topojson|mapbox&skin=vector&version=0pz8gcz:85
_handleDOMEvent @ load.php?debug=false&lang=en&modules=ext.kartographer.box%2Cdata%2Csettings%2Csite%2Cstyle|ext.kartographer.lib.topojson|mapbox&skin=vector&version=0pz8gcz:84
handler @ load.php?debug=false&lang=en&modules=ext.kartographer.box%2Cdata%2Csettings%2Csite%2Cstyle|ext.kartographer.lib.topojson|mapbox&skin=vector&version=0pz8gcz:94
  1. Save the changes -

Event Timeline

Restricted Application added a project: Maps. · View Herald TranscriptFeb 22 2018, 6:03 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Restricted Application added a project: Discovery. · View Herald TranscriptFeb 22 2018, 6:04 AM
Etonkovidova updated the task description. (Show Details)Feb 22 2018, 6:05 AM
jmatazzoni triaged this task as Normal priority.Feb 27 2018, 12:02 AM

Delete layer is similarly broken.

Change 423825 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/Kartographer@master] Comment out broken line in leaflet

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

Change 423825 merged by jenkins-bot:
[mediawiki/extensions/Kartographer@master] Comment out broken line in leaflet

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

Etonkovidova closed this task as Resolved.Apr 10 2018, 9:48 PM

Checked in betalabs - no Console error; works as expected.