MediaWiki:Common.js doesn't get "loaded" into the generated HTML from my wiki (MW 1.14.0). I've tried making a full refresh (Ctrl + Shift + R in firefox) and adding $wgUseSiteJs = true; to LocalSettings.php
The user js is loaded though, i.e. I see the following line in the generated HTML:
<script type="text/javascript" src="/w/index.php?title=User:My-username/monobook.js&action=raw&ctype=text/javascript"></script>
Are there some extra settings needed? Else, the following lines of code in includes/SkinTemplate.php seem suspicious to me...
if( $wgUseSiteJs ) { $jsCache = $this->loggedin ? '&smaxage=0' : ''; $tpl->set( 'jsvarurl', self::makeUrl('-', "action=raw$jsCache&gen=js&useskin=" . urlencode( $this->getSkinName() ) ) ); } else { $tpl->set('jsvarurl', false); }
Will they not generate something like
...User:My-username/monobook.js...
rather than
...MediaWiki:Common.js...
in the generated script inclusion tag?
Kind Regards Samuel lampa
Ok, now I found it out. It was me who had not checked the javascript inclusions careful enough. MediaWiki:Common.js is loaded with the following line in the generated HTML:
<script type="text/javascript" src="/_ptm/index.php?title=-&action=raw&smaxage=0&gen=js&useskin=monobook"><!-- site js --></script>
// Samuel
Samuel Lampa skrev:
MediaWiki:Common.js doesn't get "loaded" into the generated HTML from my wiki (MW 1.14.0). I've tried making a full refresh (Ctrl + Shift + R in firefox) and adding $wgUseSiteJs = true; to LocalSettings.php
The user js is loaded though, i.e. I see the following line in the generated HTML:
<script type="text/javascript" src="/w/index.php?title=User:My-username/monobook.js&action=raw&ctype=text/javascript"></script>
Are there some extra settings needed? Else, the following lines of code in includes/SkinTemplate.php seem suspicious to me...
if( $wgUseSiteJs ) { $jsCache = $this->loggedin ? '&smaxage=0' : ''; $tpl->set( 'jsvarurl', self::makeUrl('-', "action=raw$jsCache&gen=js&useskin=" . urlencode( $this->getSkinName() ) ) ); } else { $tpl->set('jsvarurl', false); }
Will they not generate something like
...User:My-username/monobook.js...
rather than
...MediaWiki:Common.js...
in the generated script inclusion tag?
Kind Regards Samuel lampa
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org