Last modified: 2010-05-15 15:33:25 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 2024 - JavaScript error for custom skins
JavaScript error for custom skins
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.4.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks: javascript
  Show dependency treegraph
 
Reported: 2005-04-30 12:18 UTC by Michael Keppler
Modified: 2010-05-15 15:33 UTC (History)
0 users

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


Attachments
patch for CVS (894 bytes, patch)
2005-04-30 12:24 UTC, Michael Keppler
Details
patch for REL14 (906 bytes, patch)
2005-04-30 12:25 UTC, Michael Keppler
Details

Description Michael Keppler 2005-04-30 12:18:47 UTC
The skin system includes site wide user defined JavaScript by including the
message <Skinname>.js into the output (e.g. the content of the <Monobook.js>
message is included in the output for Monobook users). For user defined skins
this message does not exist in most cases.

Besides having the administrators or the skin developers define that message
(which is both error prone), there are two solutions to avoid the bug:
* Define an empty message for each skin in the Language class (or in the
MessageCache?)
* Don't include the message into output, if it has only the fallback message
content (and is not defined)
Comment 1 Michael Keppler 2005-04-30 12:24:54 UTC
Created attachment 483 [details]
patch for CVS

The attached patch implements the second solution described above: When
generating the user JS output it checks if the message is defined and avoids
the message output if not defined.
Comment 2 Michael Keppler 2005-04-30 12:25:36 UTC
Created attachment 484 [details]
patch for REL14
Comment 3 Michael Keppler 2005-04-30 12:30:02 UTC
Um, I think I entirely forgot the JavaScript error message in the problem
report. The generated JavaScript file looks like this:

/* generated javascript */var skin = 'reduced';
var stylepath = '/development/skins';/* MediaWiki:Reduced */
&lt;Reduced.js&gt;

The problem can be seen in the third line, where the default message text
occurs, which is no valid JavaScript.
Comment 4 Brion Vibber 2005-05-01 02:43:34 UTC
Thanks! Patch committed to CVS HEAD and REL1_4.

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


Navigation
Links