Page MenuHomePhabricator

monobook toolbar or vector with old toolbar not setup randomly
Closed, ResolvedPublic

Description

with the old toolbar button are inserted through a fragment of javascript looking like

<script>if(window.mw){
mw.loader.using("mediawiki.action.edit", function() {mw.toolbar.addButton(...
...
$(function() { mw.toolbar.init(); } );
});
}</script>

init fail in some case because the selector in /resources/mediawiki.action/mediawiki.action.edit.js : $toolbar : $( '#toolbar' ), doesn't return the toolbar div element, when failure occur document.readyState == false, ditto for $.isReady, look like mw.toolbar can be init before the DOM is fully built.

This is not easy to reproduce, for some user it fails always, for other never and so on.


Version: 1.19
Severity: major

Details

Reference
bz34510

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:12 AM
bzimport set Reference to bz34510.
bzimport added a subscriber: Unknown Object (MLST).

sorry, in comment 1 I mean document.readyState == "loading" and $.isReady == false

Philippe, did you notice this problem prior to early Saturday morning (late Friday in the U.S.) We deployed a fix for bug 34431 that might be related to this problem. See r111796 for the change

I don't see the patch you're talking about in 1.19wmf1, only in trunk.

Multiple problem occurred making some button randomly appearing/disappearing since 1.19 deployment (#34409 has some impact on some button on fr.wikisource.org). I *think* italic/bold button disappear at very start of deployment.

I don't see a possible relationship between jquery selector called in mediawiki.action.edit.js while the DOM is not already built and the wikieditor. Isn't the problem than more code in mediawiki.action.edit.js should be protected by a $( document ).ready( function() ?

tagged r111796 for 1.19wmf1 merge

bug 34431 fix seems to have fixed this as well.