Last modified: 2008-04-13 18:31:56 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 13731 - MediaWiki:Common.js not loaded for anonymous users
MediaWiki:Common.js not loaded for anonymous users
Product: Wikimedia
Classification: Unclassified
Site requests (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2008-04-13 18:25 UTC by Malafaya
Modified: 2008-04-13 18:31 UTC (History)
1 user (show)

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


Description Malafaya 2008-04-13 18:25:39 UTC
I have been trying to force preview for anonymous users in vo.wikibooks. Despite the fact that the piece of code inserted into Common.js works fine in the vo.wikipedia, it was not working in vo.wikibooks. After some tests, I realized the inserted function gets executed when a user is logged in. Although, for IPs, the function doesn't get executed (tested by forcing button caption change on function entry which didn't have any effect when not logged in). This led me to believe Common.js is not being loaded for unregistered users.
Comment 1 Malafaya 2008-04-13 18:28:42 UTC
A user at #wikimedia-tech mentioned MediaWiki:Common.js not being loaded for anons but then esporadically it seemed to load.

As a side note, it may be relevant to mention that the MediaWiki namespace is called Sitanuns in vo.wb.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-04-13 18:31:56 UTC
Looking at the page source, not logged in, I see this line:

<script type="text/javascript" src="/w/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=monobook"><!-- site js --></script>

Following the URL, I find this content:


/* generated javascript */
var skin = 'monobook';
var stylepath = '/skins-1.5';

/* MediaWiki:Common.js */
/* El JavaScript isik alseimik pogebon pro gebans valik pö padilogam valik. */

/** Müt büologeda ***********************************************************************
 *  Bepenam: müton gebanis no peregistarölis ad logedön padalogoti labü redakots onsik bü dakip.

// Müton eli IP ad büologön votükamis bü dakip onsik.
// Copyright Marc Mongenet, 2006
function forcePreview()
  if (wgUserName != null || wgAction != "edit") return;
  saveButton = document.getElementById("wpSave");
  if (!saveButton) return;
  saveButton.disabled = true; = "normal";
  document.getElementById("wpPreview").style.fontWeight = "bold";


/* MediaWiki:Monobook.js (deprecated; migrate to Common.js!) */
/* Deprecated; use [[MediaWiki:common.js]] */


Which is exactly as expected.  Firebug shows that the script is loaded.  Moreover, when I attempt to edit a page, the "Save page" button is grayed out, as expected.  WORKSFORME.  Make sure JavaScript is enabled in your browser, and that caches are cleared.

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