Last modified: 2014-10-06 09:46:32 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 T52038, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50038 - OutputPage: Don't output mw.loader.state "loading" and mw.loader.state "ready" for the same module
OutputPage: Don't output mw.loader.state "loading" and mw.loader.state "ready...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: 1.23.x release
Assigned To: Krinkle
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-23 08:34 UTC by Krinkle
Modified: 2014-10-06 09:46 UTC (History)
4 users (show)

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


Attachments

Description Krinkle 2013-06-23 08:34:30 UTC
It looks like we currently output both for some modules.

Current output on a wiki with user and site css/js enabled[1] but empty:

<script>if(window.mw){
mw.loader.state({"site":"loading","user":"loading","user.groups":"loading"});
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.hidpi","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.page.watch.ajax","ext.vector.collapsibleNav","ext.visualEditor.viewPageTarget","skins.vector.js"],null,true);
}</script>
<script>if(window.mw){
mw.loader.state({"site":"ready"});
}</script>
<script>if(window.mw){
mw.loader.state({"user":"ready"});
}</script>
<script>if(window.mw){
mw.loader.state({"user.groups":"ready"});
}</script>

The first one with "loading" is always output. The last 3 with "ready" are output by OutputPage::makeResourceLoaderLink if $module->isKnownEmpty is true.

We should probably optimise this to just output "ready" in the first place.
Comment 1 Umherirrender 2014-08-24 19:12:59 UTC
This looks fixed for me, because at the moment I will get directly
mw.loader.state({"site":"ready","user":"ready","user.groups":"ready"});
when there is no site or user js page (bug 46857?).
Comment 2 Krinkle 2014-10-06 09:46:32 UTC
> resourceloader: Refactor module links output 
>
> Change-Id: I91754ce5fae3d05b4bfa7372372eba81ee2fc579

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


Navigation
Links