Last modified: 2012-03-07 02:36:43 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 T36920, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34920 - [Regression] Exception thrown by mediawiki.action.edit: Cannot read property 'imageFile' of undefined
[Regression] Exception thrown by mediawiki.action.edit: Cannot read property ...
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.19
All All
: High critical (vote)
: 1.19.0 release
Assigned To: Krinkle
: code-update-regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-03 04:56 UTC by vssun
Modified: 2012-03-07 02:36 UTC (History)
1 user (show)

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


Attachments

Description vssun 2012-03-03 04:56:44 UTC
After mediawiki 1.19 update, Edit toolbar on ml.wikipedia is not being shown.
Comment 1 vssun 2012-03-03 13:07:52 UTC
problem resolved after removing custom js
Comment 2 vssun 2012-03-03 17:01:20 UTC
Problem persists occasionally, even for unregistered users.
Comment 3 Krinkle 2012-03-06 23:55:30 UTC
It's failing for me as well (logged-in; Chrome 17; Mac).

mw.loader::execute> Exception thrown by mediawiki.action.edit: Cannot read property 'imageFile' of undefined
Comment 4 Krinkle 2012-03-07 00:04:27 UTC
It's caused by a local script:

> mwCustomEditButtons

[undefined, undefined, undefined, undefined,  Object , undefined, Object , Object , Object, Object , Object , undefined, Object , Object , Object ]

Those undefined ones cause errors, as it should.

toolbar.addButton could have a guard against this, but on the short term its also a good idea to check the site-wide scripts.

having checked those, I'm surprised, still. I debugged item 5, 6,7 (Object, undefined, Object). And found out that the code generating this is at:

https://ml.wikipedia.org/wiki/MediaWiki:Common.js

However the objects defined there look fine, and when pasting them into the console they also work fine.

Will check further if perhaps one of the special characters of the ml-language is causing ResourceLoader to destroy part of the script.
Comment 5 Krinkle 2012-03-07 00:12:40 UTC
Found it.

The function lija_rearrange() {} function in MediaWiki:Common.js is doing something. I don't know what the purpose of this function is, but a few times it is references to an array index ([1], [3] etc.) that is empty (undefined).

As a result it is setting some of the items in mwCustomEditButtons (there aliases as 'ext') to undefined.

Marking INVALID as this is not a bug in the software. If you need help with this script, feel free to ask at [[mw:Talk:RL/MGU]] or on irc://irc.freenode.net/#mediawiki
Comment 6 vssun 2012-03-07 02:36:43 UTC
Thanks Krinkle.

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


Navigation
Links