Page MenuHomePhabricator

MediaWiki:Monobook.js gets loaded by other skins
Closed, DeclinedPublic

Description

Author: z9z8z-wps

Description:
MediaWiki:Monobook.js is a misleading name since it gets loaded (as /w/index.php?title=-&action=raw) for the skins "chick", "simple", "myskin",
and possibly all new skins as well, which is not an expected behaviour.

People edit MediaWiki:Monobook.to support definitions in MediaWiki:Monobook.css expecting MediaWiki:Monobook.js being loaded just for this
skin not affecting any others.

The inclusion of MediaWiki:*.js files should follow the MediaWiki:*css scheme having a Common.js file and separate js files for the skins. If no
JavaScript files are possible for the older skins there should be a note and a Common.js file just for the newer ones.
If all this is not possible the name Monobook.js should be changed so no one thinks changes there would affects only that one skin.


Version: 1.8.x
Severity: normal

Details

Reference
bz7202

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:27 PM
bzimport set Reference to bz7202.
bzimport added a subscriber: Unknown Object (MLST).

dto wrote:

This is due to a bug in RawPage. $wgUser is initialized to the User object
corresponding to the IP address, not the actual logged in user.

dto wrote:

Wow. I feel ridiculous. Everything works perfectly fine. ([[WP:CACHE]])

If this is still an issue in 1.7-svn, please reopen. Sorry about that.

z9z8z-wps wrote:

I don't know wheter I expressed myself well or not. However, before I get confused with my versions here, the following are the steps to
reproduce this unwanted behaviour on en.wikipedia.org which runs version 1.8alpha (r16339) now.

  1. Log in to http://en.wikipedia.org/
  2. In your user preferences switch to skin "Simple"
  3. Verify that each page loaded from that wiki contains a line <script type="text/javascript" src="/w/index.php?title=-&amp;action=raw&amp;smaxage=0&amp;gen=js"><!-- site js --></script>

in the HTML source

  1. Open this very http://en.wikipedia.org/w/index.php?title=-&amp;action=raw&amp;smaxage=0&amp;gen=js and compare to http://

en.wikipedia.org/wiki/MediaWiki:Monobook.js -- for me they are basically the same

MediaWiki:Monobook.js being loaded by other Skins is the undesirable behaviour as explained in the initial comment

dto wrote:

I guess I didn't explain myself too well either. What I meant by [[WP:CACHE]] is
that after you change your skin to Simple, you should clear your cache and
reload the site js.

So step 5 would be Ctrl-Shift-R in Mozilla/Safari, Ctrl-F5 in IE, or F5 in
Opera/Konqueror. After the "...&gen=js" page finishes reloading, you shouldn't
see Monobook.js any more.

z9z8z-wps wrote:

Ok, it appears to be a cache problem, but there might be a problem with the squids because it takes some time and several reloads here
before I get the correct file for "...&smaxage=0&gen=js" and cache emptying does not help. However if I do the same with
"...&smaxage=1&gen=js" the correct file is always (after 1 sec) served. Perhaps there add some things to this oddity but that's a different issue
so I'm closing this bug again.

It might be an idea though to give this "-" file a different, skin-related name to circumvent these possible problems.

mmodell changed the task status from Resolved to Declined.Sep 7 2016, 11:11 PM