Last modified: 2012-05-03 02:42:38 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 T35660, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33660 - [Regression] window.ProtectionForm is not defined
[Regression] window.ProtectionForm is not defined
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.20.x
All All
: Highest blocker (vote)
: 1.19.0 release
Assigned To: Krinkle
:
Depends on:
Blocks: 31217
  Show dependency treegraph
 
Reported: 2012-01-11 14:50 UTC by Niklas Laxström
Modified: 2012-05-03 02:42 UTC (History)
2 users (show)

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


Attachments

Description Niklas Laxström 2012-01-11 14:50:39 UTC
Happens on ?action=protect on translatewiki.net
Comment 1 Krinkle 2012-01-22 02:44:58 UTC
Caused by a race condition. Inline code does not properly wait the module:



<select id="mwProtectExpirySelection-edit" name="wpProtectExpirySelection-edit" onchange="ProtectionForm.updateExpiryList(this)" 
<!-- /footer -->
<script>
if(window.mw){
mw.loader.load([..., "mediawiki.legacy.protect", ..]);
}
</script>
<script>
if(window.mw){
ProtectionForm.init({"tableId": "mwProtectSet", "labelText": "Unlock further protect options", "numTypes": 2, "existingMatch": true});
}
</script>


Both the inline onchange handler and the init() call on the bottom are called before the module is loaded. 

On the long term bug 33871 is the right solution. On the short solution we should add this module to the top-queue instead of the bottom queue, so that it is available throughout the page.
Comment 2 Krinkle 2012-01-22 02:51:22 UTC
Fixed in r109718.

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


Navigation
Links