Page MenuHomePhabricator

Moving foo.js to foo.css works but causes "MWException: Format text/javascript is not supported"
Closed, DuplicatePublic

Description

To reproduce, visit:

https://ca.wikinews.org/w/load.php?debug=false&lang=ca&modules=user&only=styles&skin=vector&user=Syum90&version=%2FvhL7bxU&*

The exception is:

2015-07-24 16:34:10 mw1248 cawikinews exception ERROR: [20b13378] /w/load.php?debug=false&lang=ca&modules=user&only=styles&skin=vector&user=Syum90&version=%2FvhL7bxU&*   MWException from line 600 of /srv/mediawiki/php-1.26wmf15/includes/content/ContentHandler.php: Format text/javascript is not supported for content model css {"exception":"[object] (MWException(code: 0): Format text/javascript is not supported for content model css at /srv/mediawiki/php-1.26wmf15/includes/content/ContentHandler.php:600)"}

Event Timeline

ori created this task.Jul 24 2015, 5:05 PM
ori raised the priority of this task from to Needs Triage.
ori updated the task description. (Show Details)
ori added a project: MediaWiki-ContentHandler.
ori added subscribers: ori, Krinkle.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 24 2015, 5:05 PM

https://ca.wikinews.org/w/index.php?title=Usuari:Syum90/vector.css&action=history:

(cur | prev) 15:52, 6 April 2015‎ Syum90 (Talk | contribs)‎ m . . (543 bytes) (0)‎ . . (Syum90 moved Usuari:Syum90/vector.js to Usuari:Syum90/vector.css: ups!)
(cur | prev) 15:51, 6 April 2015‎ Syum90 (Talk | contribs)‎ m . . (543 bytes) (0)‎ . . (Syum90 moved Usuari:Syum90//vector.js to Usuari:Syum90/vector.js)
(cur | prev) 15:51, 6 April 2015‎ Syum90 (Talk | contribs)‎ . . (543 bytes) (+543)‎ . . (Created page with «.ticker-container { height: 36px; overflow: hidden; border:1px solid #a7d7f9; border-left:none; border-radius:0 10px 10px 0; } .ticker-text { height: 150%; w...».)

Most likely the problem is that the page was moved from JS to CSS, but the content model remains JS.

Krinkle renamed this task from Format text/javascript is not supported for content model css to Moving foo.js to foo.css works but causes "MWException: Format text/javascript is not supported".Jul 24 2015, 8:46 PM
Krinkle set Security to None.
Krinkle added subscribers: daniel, Legoktm.