Last modified: 2012-03-12 12:50:20 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 T36696, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34696 - mw.loader.using shouldn't call callback more than once
mw.loader.using shouldn't call callback more than once
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.20.x
All All
: Normal major (vote)
: 1.20.0 release
Assigned To: Roan Kattouw
: code-update-regression, patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-24 19:50 UTC by Ryan Kaldari
Modified: 2012-03-12 12:50 UTC (History)
7 users (show)

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


Attachments
Patch to fix callback bug (647 bytes, patch)
2012-03-07 23:54 UTC, Ryan Kaldari
Details

Description Ryan Kaldari 2012-02-24 19:50:57 UTC
When running CentralNotice on trunk with debug=true, I usually get the banner repeated several times at the top of the page (as many as 5 times). The BannerController and BannerListLoader are only loaded once, but the BannerLoader gets loaded several times. I've only noticed this behavior after my last svn update, so it is likely due to a recent change.
Comment 1 Ryan Kaldari 2012-02-24 21:53:15 UTC
I've isolated the bug. The following command only gets executed once...
mw.loader.using( 'mediawiki.user', function() { ...blah... } );
... yet the anonymous callback function (...blah...) gets executed multiple times.
Comment 2 Mark A. Hershberger 2012-02-25 18:23:50 UTC
I wonder if similar problems could be causing bug 34664
Comment 3 Mark A. Hershberger 2012-02-25 20:56:26 UTC
(In reply to comment #0)
> When running CentralNotice on trunk with debug=true,

Since you say this is trunk, changing the version.
Comment 4 Ryan Kaldari 2012-02-29 20:04:33 UTC
Just saw this happen without debug=true on test.wikipedia.org. Raising severity.

Roan said this was related to work that he and Krinkle recently did on ResourceLoader, and he has a solution for it.
Comment 5 Ryan Kaldari 2012-02-29 20:42:40 UTC
Also, this may be unique to Firefox.
Comment 6 Krinkle 2012-02-29 21:10:53 UTC
Assigning to Roan per comment 4
Comment 7 Ryan Kaldari 2012-03-07 23:54:34 UTC
Created attachment 10195 [details]
Patch to fix callback bug
Comment 8 Ryan Kaldari 2012-03-12 12:50:20 UTC
Patch (based on Roan's analysis) committed in r113617. If anything else is needed, please reopen.

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


Navigation
Links