Page MenuHomePhabricator

VisualEditor throws map.remove error while loading pages with maps for editing
Closed, ResolvedPublicBUG REPORT

Description

It has been reported on pt.wiki that VisualEditor has freezing while loading on several city articles, and after some tests, I found out that this error is due to Template:Mapa de localização (our map render) that is loaded by Template:Info/Assentamento (our settlement infobox). What makes it stranger is that upon freezing, if you click "Read" and then "Edit", VisualEditor loads normally.

Steps to Reproduce: Open any city article, like Buenos Aires, and click "Edit".

Actual Results: VisualEditor throws (Uncaught TypeError: map.remove is not a function) and failed to finish loading the page for users to edit.

VM82:359 Uncaught TypeError: map.remove is not a function
    at <anonymous>:359:1125
    at fire (load.php?lang=zh-cn&modules=jquery&skin=vector&version=tqh7e:46)
    at Object.fireWith (load.php?lang=zh-cn&modules=jquery&skin=vector&version=tqh7e:47)
    at Object.fire (<anonymous>:383:482)
    at VeUiMWNoticesPopupTool.ve.ui.MWNoticesPopupTool.setNotices (<anonymous>:973:275)
    at VeInitMwDesktopArticleTarget.ve.init.mw.DesktopArticleTarget.surfaceReady (<anonymous>:15:410)
    at <anonymous>:1215:294

Expected Results: Loading completion, letting users free for editing.

See also: T250620: Visual Editor fails during save dialog on specific page containing a Kartographer map

Event Timeline

VulpesVulpes825 renamed this task from VisualEditor freezing while loading pages with maps on settlement infobox to VisualEditor throws map.remove error while loading pages with maps for editing.Apr 26 2020, 7:33 AM
VulpesVulpes825 updated the task description. (Show Details)
VulpesVulpes825 changed the task status from Open to Stalled.Apr 26 2020, 11:12 AM

My previous assumption is incorrect. The patch also fixed this issue, rather than the cause of this issue. This should be fixed when the patch is implemented in the production. I will recheck and mark as resolved when 1.35 wmf.30 is deployed.

I wasn't aware of this problem, it seems significantly more disruptive than T250620. They're both indeed caused by the same bug. I think I'll backport the patch today.

Change 592718 had a related patch set uploaded (by Bartosz Dziewoński; owner: TheDJ):
[mediawiki/extensions/Kartographer@wmf/1.35.0-wmf.28] Do not use remove() on maplinks

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

Change 592718 merged by jenkins-bot:
[mediawiki/extensions/Kartographer@wmf/1.35.0-wmf.28] Do not use remove() on maplinks

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

Mentioned in SAL (#wikimedia-operations) [2020-04-27T18:21:44Z] <urbanecm@deploy1001> Synchronized php-1.35.0-wmf.28/extensions/Kartographer/modules/: SWAT: 6cd2847: Do not use remove() on maplinks (T250620; T251053) (duration: 00m 58s)

matmarex changed the task status from Stalled to Open.Apr 27 2020, 6:25 PM

The fix should now be deployed on all Wikimedia wikis.

Albertoleoncio claimed this task.

After the deploy, the bug no longer occurs on my tests. I'm marking here as Resolved. Thank you all!