Maps's staticframe wikipage.content hook code JS fatals in some circumstances when saving in the new wikitext editor
Closed, ResolvedPublic1 Story Points

Description

Exception is thrown when saving:

Uncaught TypeError: maps.pop(...).remove is not a function
    at Link.<anonymous> (staticframe.js?d9154:72)
    at Function.each (load.php?debug=true&lang=en-gb&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1ljmhq7:384)
    at staticframe.js?d9154:71
    at fire (load.php?debug=true&lang=en-gb&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1ljmhq7:3148)
    at Object.fireWith (load.php?debug=true&lang=en-gb&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1ljmhq7:3260)
    at Object.fire (load.php?debug=true&lang=en-gb&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1ljmhq7:13065)
    at VeUiMwSaveDialog.ve.ui.MWSaveDialog.showPreview (ve.ui.MWSaveDialog.js?bb4cf:153)
    at Object.<anonymous> (ve.init.mw.ArticleTarget.js?31af9:1123)
    at fire (load.php?debug=true&lang=en-gb&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1ljmhq7:3148)
    at Obje

Causes the save to be interrupted (changes are saved but the editor does not exit - from the user's POV nothing happens when pressing save apart from some dialog animation).

Steps to reproduce:

  • go to a page with a map (test page)
  • edit the page in new wikitext editor (whether the edited section includes the map does not seem to matter)
  • save
Tgr created this task.Mar 1 2017, 1:05 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptMar 1 2017, 1:05 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdforrester-WMF renamed this task from New wikitext editor maps-related error to Maps's staticframe wikipage.content hook code JS fatals in some circumstances when saving in the new wikitext editor.Mar 25 2017, 2:41 AM
Jdforrester-WMF triaged this task as Normal priority.
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF set the point value for this task to 1.
TheDJ added a subscriber: TheDJ.Jul 22 2017, 8:44 PM

I didn't get that one, but i did get
[Error] Failed to load resource: the server responded with a status of 400 (HTTP/2.0 400) (https://maps.wikimedia.org/img/osm-intl,14,38.922679,-77.206057,300x300.png?domain=www.mediawiki.org&title=User%3ATgr+%28WMF%29%2Ftest2&groups=_1a41aece84fcd54be5cd94fff86557a95d40fc92, line 0)

Change 367109 had a related patch set uploaded (by TheDJ; owner: TheDJ):
[mediawiki/extensions/Kartographer@master] StaticMap: fix error on multiple wikipage.content

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

Change 367109 merged by jenkins-bot:
[mediawiki/extensions/Kartographer@master] StaticMap: fix error on multiple wikipage.content

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

debt moved this task from Backlog to Needs review on the Maps-Sprint board.
debt closed this task as Resolved.Aug 3 2017, 7:15 PM
debt moved this task from Needs review to Done on the Maps-Sprint board.
debt claimed this task.
debt added a subscriber: debt.

Closing this out, as it was deployed the week of July 25, 2017.

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptAug 3 2017, 7:15 PM