Page MenuHomePhabricator

JavaScript stopped working on Wikipedia in Spanish due to RefToolbar gadget which uses jQuery's .live()
Closed, InvalidPublic

Description

JavaScript stopped working on Wikipedia in Spanish and there seems to be due to a local change. The earliest report of this problem was made last November 28. The problem only occurs when using the Vector skin, but https://es.wikipedia.org/wiki/MediaWiki:Vector.js is empty. Until today no one in the Spanish Wikipedia community has been able to discover the cause. I deactivated all the gadgets and beta functions, but the problem persists.
The only code that I can not disable is found in https://es.wikipedia.org/wiki/MediaWiki:Common.js. Could be due to some incompatibility related to any recent changes in the software?

Event Timeline

Metronomo raised the priority of this task from to Needs Triage.
Metronomo updated the task description. (Show Details)
Metronomo subscribed.

Thanks for taking the time to report this!

JavaScript stopped working on Wikipedia in Spanish

That's not fully correct - going to a random page and editing it, I can use the "Sintaxis wiki" stuff at the bottom and when I click some characters they get inserted. And that's based on JavaScript. :)

Could be due to some incompatibility related to any recent changes in the software?

Only thing that comes to my mind is https://lists.wikimedia.org/pipermail/wikitech-l/2014-December/079699.html but that got deployed on December 17th.

Can you please provide steps to reproduce the problem? Or link to some comments on-wiki where the problem was discussed?

Also, as this might be Javascript related, please open the Error Console (or whatever it is called in your browser) and reload the page that you see the problem on. If there is a problem or an error with JavaScript it should be printed in that console. For more information please see:

See https://meta.wikimedia.org/wiki/Tech#Several_problems_in_es:WP for a similar discussion.

Please try clearing your browser cache. Instructions (in English) are available at https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#CLEAR

The other possibility is that there is a bugged-out gadget, but I couldn't see one when I was trying to investigate the issue reported at Meta.

Aklapper claimed this task.

Oh true, thanks, TTO! That discussion on Meta was also about es.wp - I had already forgotten. :(
In any case this is likely not an issue wiki MediaWiki code or Wikimedia server configuration, so I am closing this task as invalid. Which does not mean that we wouldn't help with followup questions here. :)

Adding a user who speaks Spanish.

I think that the cause is this gadget: https://es.wikipedia.org/w/index.php?title=MediaWiki:Gadget-DetectaDesambiguaciones.js, based on https://de.wikipedia.org/w/index.php?title=MediaWiki:Gadget-bkl-check.js. It is very popular in Wikipedia in Spanish, but is not enabled by default. So in that community many users perceive the problem, but outsiders are all well. Today I cleared my cache, but still did not work JavaScript. I opened the console of errors and then pointed to this script. I turned it off and cleaned my cache again, and JavaScrip worked well.

Metronomo: Please provide the specific error console output for JavaScript issues, as described above.

(I went to https://es.wikipedia.org/wiki/Especial:Preferencias#mw-prefsection-gadgets and enabled El detector de desambiguaciones but cannot reproduce any issues when going to a page to edit it.)

Ok, I poked around a bit, and I finally got an error message:

TypeError: $(...).live is not a function
index.php:30 
https://en.wikipedia.org/w/index.php?title=MediaWiki:RefToolbarNoDialogs.js&action=raw&ctype=text/javascript

This is caused by RefToolbar gadget. It has 3 versions. It only happens in the RefToolbar 2.0a configuration:

  • ACTIVATE: Enable enhanced editing toolbar
  • DEACTIVATE: Enable wizards for inserting links, tables as well as the search and replace function.

I was able to reproduce it with that exact configuration.

The problem is not mediawiki, but that gadget.

Aha. That function live() has been deprecated for some years, and was finally removed a few weeks ago. I believe the modern equivalent is on(), although I'm no jQuery expert.

This is why people shouldn't ignore deprecation warnings! That function was throwing up deprecation warnings for quite some time before it was removed.

I've filed a protected edit request at https://en.wikipedia.org/wiki/MediaWiki_talk:RefToolbarNoDialogs.js.

Aklapper renamed this task from JavaScript stopped working on Wikipedia in Spanish to JavaScript stopped working on Wikipedia in Spanish due to RefToolbar gadget which uses jQuery's .live().Dec 31 2014, 12:48 PM
Aklapper set Security to None.

The protected edit request has been fulfilled; please clear your cache and retest.