Page MenuHomePhabricator

Maps's staticframe wikipage.content hook code JS fatals in some circumstances when saving in the new wikitext editor
Closed, ResolvedPublic1 Estimated 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

Event Timeline

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 Medium priority.
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF set the point value for this task to 1.

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 claimed this task.
debt moved this task from Needs review to Done on the Maps-Sprint board.
debt subscribed.

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