Script error at addStyleTag somewhere in mw-core for IE
Closed, ResolvedPublic

Description

Complete stack with code. This bug causes UpWiz not to work.

/*JScript global code JScript*/
//////////
mw.loader.implement("mediawiki.page.ready", function () {

jQuery(document).ready(function ($) {
    if (!('placeholder' in document.createElement('input'))) {
        $('input[placeholder]').placeholder();
    }
    $('.mw-collapsible').makeCollapsible();
    if ($('table.sortable').length) {
        mw.loader.using('jquery.tablesorter', function () {
            $('table.sortable').tablesorter();
        });
    }
    $('input[type=checkbox]:not(.noshiftselect)').checkboxShiftClick();
    mw.util.updateTooltipAccessKeys();
});;

}, {

"": ""

}, {});

/*JScript anonymous function JScript*/
//////////
if (allReady(registry[module].dependencies)) {

execute(module); //         module  "mediawiki.page.ready"  String

}

/*execute JScript*/
//////////
if (typeof style === 'string') {

addInlineCSS(style); //     style   ""      String

}

/*addInlineCSS JScript*/
//////////
else {

$newStyle = $(
addStyleTag(css, getMarker())).data('ResourceLoaderDynamicStyleTag', true); //      css     ""      String

}

/*addStyleTag JScript*/
//////////
function addStyleTag(text, $nextnode) {

var s = document.createElement('style');
s.type = 'text/css';
s.rel = 'stylesheet';
if ($nextnode) { //         $nextnode       undefined       Benutzerdefinierter Typ
    if ($nextnode.nodeType) {
        $nextnode = $($nextnode);
    }
    $nextnode.before(s);
} else {
    document.getElementsByTagName('head')[0].appendChild(s);
}
if (s.styleSheet) {
    // ERROR: Ungültiger Prozeduraufruf oder ungültiges Argument
    s.styleSheet.cssText = text; //         s.styleSheet    {...}   Object
    //      s.styleSheet.cssText    ""      String
    //      text    ""      String
 
} else {
    s.appendChild(document.createTextNode(String(text)));
}
return s;

}

No matter what I try to assign to s.styleSheet.cssText, it always throws an error.
A lot of RL modules are affected
// In debug mode (&debug=true) the error are ignored but the style is missing


Version: 1.20.x
Severity: blocker

bzimport added a project: MediaWiki-JavaScript.Via ConduitNov 22 2014, 12:46 AM
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz38032.
Rillke created this task.Via LegacyJun 28 2012, 5:36 PM
Rillke added a comment.Via ConduitJun 28 2012, 5:40 PM

Details zum Fehler auf der Webseite

Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Zeitstempel: Fri, 29 Jun 2012 17:40:26 UTC

Meldung: Ungültiger Prozeduraufruf oder ungültiges Argument
Zeile: 145
Zeichen: 580
Code: 0
URI: http://bits.wikimedia.org/en.wikibooks.org/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20120625T154330Z

Rillke added a comment.Via ConduitJun 28 2012, 5:45 PM

see also
https://commons.wikimedia.org/wiki/Commons:Help_desk#code
(and all the upwiz-error reports)

This error is also reproducible at en.wikibooks and Wikimedia commons (all 1.20wmf6)

Krinkle added a comment.Via ConduitJun 28 2012, 7:37 PM
  • This bug has been marked as a duplicate of bug 34276 ***
Rillke added a comment.Via ConduitJun 29 2012, 2:07 PM

Bug 38024 actually "fixed" this bug or made it more unlikely to happen.

Add Comment