Last modified: 2012-01-28 15:54:44 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 T35922, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33922 - mediawiki.action.edit.js tries to get DOM elements before DOM-ready
mediawiki.action.edit.js tries to get DOM elements before DOM-ready
Status: RESOLVED DUPLICATE of bug 33952
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.20.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: javascript, patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-24 09:34 UTC by Michael M.
Modified: 2012-01-28 15:54 UTC (History)
3 users (show)

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


Attachments
Proposed patch (2.09 KB, patch)
2012-01-25 08:16 UTC, Michael M.
Details

Description Michael M. 2012-01-24 09:34:46 UTC
When I tried to test a patch for bug 33711 I ran into strange problems which I could solve only by disabling the edit toolbar. Some callback functions hooked on jQuery.ready were not executed.
Now after looking into the source code of mediawiki.action.edit.js I think the problem could originate there:
The code tries to get $( '#wpTextbox1' ), $( '#toolbar' ) and $( '#wpSummary' ) right at the beginning, though it should wait for jQuery.ready before doing so.
I don't know if this caused my problems, but fixing it is a good idea anyway.
Comment 1 Helder 2012-01-24 19:57:27 UTC
Whoever fix this may have interest in helping fixing bug 31511.

Check out the small test case provided on bug 31511 comment 17.
Comment 2 Michael M. 2012-01-25 08:16:10 UTC
Created attachment 9903 [details]
Proposed patch

The main problem was the fact that in my installation I have $wgIncludeLegacyJavaScript = false, so mwCustomEditButtons was undefined, which caused the error.

By the way: Why is scrollEditBox a named function?
Comment 3 Krinkle 2012-01-28 15:54:44 UTC
There's a lot of small and big issues with module, marking as duplicate of bug 33952 which will cover this problem. Thanks!

*** This bug has been marked as a duplicate of bug 33952 ***

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


Navigation
Links