To reproduce:
- Open a css page for editing with section=new, e.g. http://en.wikipedia.org/wiki/Special:MyPage/common.css?action=edit§ion=new
- Enter text.
- Click "Save page".
Ideally the initial action=edit§ion=new should present an error message. At the least, the attempted save should present an error message instead of throwing an uncaught exception.
Exception:
2012-12-12 14:11:05 mw55 enwiki: [3e244cf2] /w/index.php?title=User:Anomie/common.css&action=submit Exception from line 1466 of /usr/local/apache/common-local/php-1.21wmf5/includes/WikiPage.php: sections not supported for content model css
#0 [internal function]: WikiPage->replaceSectionContent('new', Object(CssContent), 'test')
#1 /usr/local/apache/common-local/php-1.21wmf5/includes/Article.php(1944): call_user_func_array(Array, Array)
#2 /usr/local/apache/common-local/php-1.21wmf5/includes/EditPage.php(1486): Article->__call('replaceSectionC...', Array)
#3 /usr/local/apache/common-local/php-1.21wmf5/includes/EditPage.php(1486): Article->replaceSectionContent('new', Object(CssContent), 'test')
#4 /usr/local/apache/common-local/php-1.21wmf5/includes/EditPage.php(1133): EditPage->internalAttemptSave(false, false)
#5 /usr/local/apache/common-local/php-1.21wmf5/includes/EditPage.php(396): EditPage->attemptSave()
#6 /usr/local/apache/common-local/php-1.21wmf5/includes/actions/EditAction.php(51): EditPage->edit()
#7 /usr/local/apache/common-local/php-1.21wmf5/includes/actions/EditAction.php(71): EditAction->show()
#8 /usr/local/apache/common-local/php-1.21wmf5/includes/Wiki.php(429): SubmitAction->show()
#9 /usr/local/apache/common-local/php-1.21wmf5/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))
#10 /usr/local/apache/common-local/php-1.21wmf5/includes/Wiki.php(555): MediaWiki->performRequest()
#11 /usr/local/apache/common-local/php-1.21wmf5/includes/Wiki.php(448): MediaWiki->main()
#12 /usr/local/apache/common-local/php-1.21wmf5/index.php(59): MediaWiki->run()
#13 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#14 {main}
Version: 1.21.x
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=50962