Last modified: 2011-08-09 15:53:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32291, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30291 - wikibits's function updateTooltipAccessKeys should not throw errors
wikibits's function updateTooltipAccessKeys should not throw errors
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.17.x
All All
: Low normal (vote)
: ---
Assigned To: Krinkle
https://secure.wikimedia.org/wikibook...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-09 15:45 UTC by Helder
Modified: 2011-08-09 15:53 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2011-08-09 15:45:50 UTC
See the url above for the usecase.

In that case the nodeList is an array having only one element which is undefined.

The error can be avoided by changing the line[1]

  element = nodeList[i];

to something like:

  element = nodeList[i];
  if (!element) {
     continue;
  }


[1] On this loop:
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/common/wikibits.js?annotate=91660#l230
Comment 1 Krinkle 2011-08-09 15:52:55 UTC
That function has been deprecated, it worked for most cases and scripts still referring to it can continue to do so. The new version is mw.util.updateTooltipAccessKeys, which is part of the new mediaWiki.js library.

The new version doesn't have this problem (as it's covered by jQuery), the old version is not automatically redirected to the new one as it's not guaranteed to be 100% compatible.

I would recommend updating the script [1] to use mw.util.updateTooltipAccessKeys instead.

--
Krinkle

[1] https://secure.wikimedia.org/wikibooks/en/wiki/MediaWiki:Common.js/RandomBook.js

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links