Last modified: 2010-05-15 15:37:38 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 2064 - Media type for JavaScript is hard-coded, and should not be
Media type for JavaScript is hard-coded, and should not be
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks: javascript
  Show dependency treegraph
Reported: 2005-05-03 17:19 UTC by Nico R.
Modified: 2010-05-15 15:37 UTC (History)
0 users

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

JS media type patch against mediawiki-1.4.3 (21.05 KB, patch)
2005-05-03 17:21 UTC, Nico R.
Patch against CVS HEAD as of 2005-05-04T10:33:08+0200 (21.28 KB, patch)
2005-05-04 08:31 UTC, Nico R.
Fixed version of patch for HEAD branch (21.29 KB, patch)
2005-05-05 20:43 UTC, Nico R.

Description Nico R. 2005-05-03 17:19:43 UTC
Currently, the MediaWiki software uses a hard-coded media type (MIME type) of
'text/javascript' for all scripts in the JavaScript language. No type of this
name has been registered with IANA by now, and some users probably want to use a
more correct type of, for example, 'application/x-javascript' until this issue
is resolved.
The attached patch adds the ability to configure the media type which shall be
used for scripts in the JavaScript language. This is a good idea as work on
getting media types for this language registered has already begun. The default
value set by this patch is 'text/javascript'; users can override it in
LocalSettings.php as usual.
The patch is for 1.4.3 or the REL1_4 branch (will work on both at the moment).
It will not apply cleanly to CVS HEAD.
Comment 1 Nico R. 2005-05-03 17:21:15 UTC
Created attachment 489 [details]
JS media type patch against mediawiki-1.4.3
Comment 2 Brion Vibber 2005-05-04 01:01:54 UTC
Thank you, W3C, for using non-assigned types as the only examples in your HTML specification 
documentation. :P
Comment 3 Ævar Arnfjörð Bjarmason 2005-05-04 02:35:44 UTC
The diff fails on HEAD (works on REL1_4). It's probably unwise to add this to
REL1_4 (closed for features)

$ patch -p1 < patch 
patching file includes/DefaultSettings.php
Hunk #1 succeeded at 374 with fuzz 1 (offset 35 lines).
patching file includes/EditPage.php
Hunk #1 succeeded at 923 (offset 173 lines).
Hunk #2 succeeded at 1015 (offset 173 lines).
patching file includes/RawPage.php
Hunk #1 succeeded at 20 (offset 3 lines).
patching file includes/Skin.php
Hunk #1 FAILED at 202.
Hunk #2 FAILED at 2121.
2 out of 2 hunks FAILED -- saving rejects to file includes/Skin.php.rej
patching file includes/SkinTemplate.php
Hunk #1 succeeded at 145 with fuzz 2.
Hunk #2 succeeded at 218 (offset 6 lines).
Hunk #3 FAILED at 861.
Hunk #4 succeeded at 907 (offset 44 lines).
1 out of 4 hunks FAILED -- saving rejects to file includes/SkinTemplate.php.rej
patching file skins/MonoBook.php
Hunk #1 succeeded at 61 with fuzz 1 (offset 8 lines).
Hunk #2 succeeded at 122 (offset 9 lines).
patching file skins/Standard.php
patching file skins/disabled/
patching file skins/disabled/
patching file skins/disabled/
can't find file to patch at input line 258
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|diff -Naur mediawiki-1.4.3/skins/disabled/Wikimania.php
|--- mediawiki-1.4.3/skins/disabled/Wikimania.php       2005-04-03
18:24:25.000000000 +0000
|+++ mediawiki-1.4.3-jsmimetype/skins/disabled/Wikimania.php    2005-05-03
16:51:04.000000000 +0000
File to patch: skins/disabled/Wikimania.php
skins/disabled/Wikimania.php: No such file or directory
Skip this patch? [y] y
Skipping patch.
2 out of 2 hunks ignored
patching file skins/disabled/
Comment 4 Nico R. 2005-05-04 08:31:59 UTC
Created attachment 493 [details]
Patch against CVS HEAD as of 2005-05-04T10:33:08+0200

This patch applies cleanly against CVS HEAD as of a few seconds ago.
Comment 5 Nico R. 2005-05-05 20:43:49 UTC
Created attachment 501 [details]
Fixed version of patch for HEAD branch

Sorry, the previous patch had bugs in it: there were a few '$' characters
missing due to a copy-and-paste error. I created this fixed version by
inserting them into the patch file.
Comment 6 Ævar Arnfjörð Bjarmason 2005-05-05 21:00:55 UTC
Applied to HEAD, thanks for the patch.

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