Page MenuHomePhabricator

mw.DesktopArticleTarget.prototype#loadFail sometimes given (unexpected?) jqXHR
Closed, ResolvedPublic1 Estimated Story Points

Description

Loading VisualEditor with jQuery 3+Migrate (T124742; https://gerrit.wikimedia.org/r/322812) results in the following warning:

JQMIGRATE: jQXHR.error is deprecated and removed

  • ..
  • ve.init.mw.DesktopArticleTarget.loadFail
  • ..
  • ve.init.mw.ArticleTarget.load
  • ve.init.mw.DesktopArticleTarget.activate

It seems loadFail() is given an jqXHR as first parameter. This matches the original documentation in parent class mw.ArticleTarget#loadFail, however I'm not sure if the code still expects this.

Perhaps it can be cleaned up as to not be passed anymore, or altered to not access its .error property, which is in fact, not an error representation, but a deprecated jqXHR method that is an alias of jQuery.Deferred#fail(), which adds a callback to the promise rejection handler.

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.

Reproducible when you have VE configured to connect to RB directly from the client and it's not running. https://gerrit.wikimedia.org/r/#/c/327721/ seems to fix

Change 327721 had a related patch set uploaded (by Bartosz Dziewoński):
Fix loadFail parameter handling

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

Change 327721 merged by jenkins-bot:
Fix loadFail parameter handling

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