Last modified: 2006-09-03 17:49:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 7202 - MediaWiki:Monobook.js gets loaded by other skins
MediaWiki:Monobook.js gets loaded by other skins
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2006-09-02 01:34 UTC by Schnargel
Modified: 2006-09-03 17:49 UTC (History)
0 users

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


Description Schnargel 2006-09-02 01:34:10 UTC
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 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.
Comment 1 Dan Li 2006-09-02 02:27:35 UTC
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.
Comment 2 Dan Li 2006-09-02 02:58:11 UTC
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.
Comment 3 Schnargel 2006-09-03 08:53:46 UTC
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 which runs version 1.8alpha (r16339) now.

1. Log in to
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
4. Open this very;action=raw&amp;smaxage=0&amp;gen=js and compare to http:// -- 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
Comment 4 Dan Li 2006-09-03 16:47:36 UTC
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.
Comment 5 Schnargel 2006-09-03 17:49:33 UTC
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.

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