Last modified: 2012-06-28 19:37:08 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 T36276, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34276 - "Invalid argument" error when mw.util.addCSS is used and various modules are loaded
"Invalid argument" error when mw.util.addCSS is used and various modules are ...
Status: RESOLVED DUPLICATE of bug 31676
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://pt.wikibooks.org/w/index.php?t...
:
: 38032 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-08 18:14 UTC by Helder
Modified: 2012-06-28 19:37 UTC (History)
4 users (show)

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


Attachments

Description Helder 2012-02-08 18:14:02 UTC
If I go to
http://pt.wikibooks.org/wiki/Especial:Prefer%C3%AAncias?uselang=qqx#mw-prefsection-gadgets
and enable this first group of gadgets:
[1] IEbug
[2] Edittools
[3] Correlatos
[4] ExpandAllOnPrint
[5] FeedbackHighlight
[6] rev-e-avisos
[7] ProgressLevel

or this second group of gadgets: [1], [2], [3], [4] and
[8] BookGadgets

and open the page
http://pt.wikibooks.org/w/index.php?title=Test&action=edit&debug=1&uselang=en
using IE9, I get the error
----
Line: 170
Error: Invalid argument.
----

The line 170 is this part of the definition of mw.util.addCSS:
s.styleSheet.cssText = text; // IE
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/resources/mediawiki/mediawiki.util.js?view=markup#l164

The error disapears if
* I disable any of the gadgets in the first group above (and keep the other 6 enabled) or
* I disable any of the gadgets in the second group above (and keep the other 4 enabled)

The code of [[MediaWiki:Gadget-IEbug.js]] is just
mw.util.addCSS( 'a { color: red; }' );
mw.util.addCSS( 'a { color: blue; }' );
and was created to try to find the cause of the bug, which was happening on
https://pt.wikibooks.org/wiki/MediaWiki:Gadget-Internet_Explorer.js
(which was copied from [[MediaWiki:Common.js]])
Comment 1 Helder 2012-02-08 18:19:32 UTC
(In reply to comment #0)
> The code of [[MediaWiki:Gadget-IEbug.js]] is just
I mean, [[wikibooks:pt:MediaWiki:Gadget-IEbug.js]].
Comment 2 Krinkle 2012-06-28 12:42:35 UTC
This error has nothing to do with those gadgets or mw.util.addCSS itself (at least not directly).

This is bug 31676. IE does not support more then 31 stylesheets. This is a known issue and there are several solutions but they either don't work well with our modularity or it causes other issues (such as @import). 

Marking dupe of bug 31676.

*** This bug has been marked as a duplicate of bug 31676 ***
Comment 3 Krinkle 2012-06-28 19:37:08 UTC
*** Bug 38032 has been marked as a duplicate of this bug. ***

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


Navigation
Links