Author: haza.wiki
Description:
For some reason, certain skins cause the Javascript elements in the document head to appear in a different order, causing user scripts to break if they depend on a script which appears after their user JS is invoked.
Monobook, Chick, Modern, MySkin and Simple call the JS scripts in the correct order - ie. site JS and custom user script at the end of the document head, shown below.
<script type="text/javascript" src="/skins-1.5/common/wikibits.js?182"><!-- wikibits js --></script> <!-- Head Scripts --> <script type="text/javascript" src="/skins-1.5/common/ajax.js?182"></script> <script type="text/javascript" src="/skins-1.5/common/ajaxwatch.js?182"></script> <script type="text/javascript" src="/skins-1.5/common/mwsuggest.js?182"></script>
<script type="text/javascript">/*<![CDATA[*/
var wgNotice='';var wgNoticeLocal='';
/*]]>*/</script> <script type="text/javascript" src="http://upload.wikimedia.org/centralnotice/wikimedia/en/centralnotice.js?182"></script>
<script type="text/javascript" src="/w/index.php?title=-&action=raw&smaxage=0&gen=js&useskin=monobook"><!-- site js --></script> <script type="text/javascript" src="/w/index.php?title=User:Haza-w/monobook.js&action=raw&ctype=text/javascript"></script>
</head>
Classic, Cologne Blue and Nostalgia call the site JS and custom user script *before* some of the other JS libraries, which causes scripts dependent on those libraries to break.
<script type="text/javascript" src="/skins-1.5/common/wikibits.js?182"></script> <script type="text/javascript" src="/w/index.php?title=-&action=raw&smaxage=0&gen=js&useskin=standard"><!-- site js --></script> <script type="text/javascript" src="/w/index.php?title=User:Haza-w/standard.js&action=raw&ctype=text/javascript"></script> <script type="text/javascript" src="/skins-1.5/common/ajax.js?182"></script> <script type="text/javascript" src="/skins-1.5/common/ajaxwatch.js?182"></script> <script type="text/javascript" src="/skins-1.5/common/mwsuggest.js?182"></script>
<script type="text/javascript">/*<![CDATA[*/
var wgNotice='';var wgNoticeLocal='';
/*]]>*/</script> <script type="text/javascript" src="http://upload.wikimedia.org/centralnotice/wikimedia/en/centralnotice.js?182"></script>
</head>
The cause of the bug might not rest with the skins themselves, but it would be useful if this were diagnosed and rectified.
Version: unspecified
Severity: normal
URL: http://meta.wikimedia.org/wiki/Main_Page