Last modified: 2013-04-16 01:29:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43706, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41706 - EditPage: Preloaded page should be converted if possible and needed
EditPage: Preloaded page should be converted if possible and needed
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ContentHandler (Other open bugs)
1.21.x
All All
: High normal (vote)
: 1.21.0 release
Assigned To: Daniel Kinzler
http://pt.wikipedia.org/w/index.php?t...
: code-update-regression
: 41996 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-02 19:21 UTC by Helder
Modified: 2013-04-16 01:29 UTC (History)
7 users (show)

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


Attachments

Description Helder 2012-11-02 19:21:04 UTC
When I access
http://pt.wikipedia.org/w/index.php?title=Usu%C3%A1ria:Aleth_Bot/Substitui%C3%A7%C3%A3o_de_afluentes.css&action=edit&section=new&preload=Usu%C3%A1ria%3AAleth+Bot%2FSubstitui%C3%A7%C3%A3o+de+afluentes%2FPedido+Padr%C3%A3o
I'm getting the following error
----
[6c3211ca] 2012-11-02 19:12:53: Fatal exception of type MWException
----

It also happens in this simplified URL:
https://pt.wikipedia.org/wiki/User:Aleth_Bot/common.css?action=edit&section=new&preload=foo

(Maybe it is related to ContentHandler?)
Comment 1 Chris Steipp 2012-11-02 19:28:20 UTC
2012-11-02 19:26:52 srv235 ptwiki: [33a33019] /wiki/User:Aleth_Bot/common.css?action=edit&section=new&preload=foo   Exception from line 529 of /usr/local/apache/common-local/php-1.21wmf2/includes/content/ContentHandler.php: Format text/css is not supported for content model wikitext
#0 /usr/local/apache/common-local/php-1.21wmf2/includes/content/ContentHandler.php(1102): ContentHandler->checkFormat('text/css')
#1 /usr/local/apache/common-local/php-1.21wmf2/includes/content/AbstractContent.php(98): TextContentHandler->serializeContent(Object(WikitextContent), 'text/css')
#2 /usr/local/apache/common-local/php-1.21wmf2/includes/EditPage.php(1955): AbstractContent->serialize('text/css')
#3 /usr/local/apache/common-local/php-1.21wmf2/includes/EditPage.php(491): EditPage->toEditText(Object(WikitextContent))
#4 /usr/local/apache/common-local/php-1.21wmf2/includes/EditPage.php(370): EditPage->displayPermissionsError(Array)
#5 /usr/local/apache/common-local/php-1.21wmf2/includes/actions/EditAction.php(51): EditPage->edit()
#6 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(428): EditAction->show()
#7 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(305): MediaWiki->performAction(Object(Article))
#8 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(554): MediaWiki->performRequest()
#9 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(447): MediaWiki->main()
#10 /usr/local/apache/common-local/php-1.21wmf2/index.php(59): MediaWiki->run()
#11 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#12 {main}
Comment 2 Daniel Kinzler 2012-11-03 20:23:09 UTC
Yes, preloading one kind of content and then trying to turn it into another will cause an error. That's by design, though admittedly the problem should be reported in a nicer way.

Try renaming the page you are trying to preload so it also has the .css extension. Please let me know whether that works, I think it should.

Anyway: For certain kinds of content automatic conversion could be supported, I suppose. But that needs a bit more thought.
Comment 3 Helder 2012-11-03 20:40:01 UTC
I got the error "The desired destination uses a different content model. Can not convert from wikitext to CSS." when I tried to move the page.
Comment 4 Daniel Kinzler 2012-11-03 22:44:17 UTC
Ugh. Damn. Of course. This is also by design, though this design seems a bit too restrictive. I'll think about how to best fix this.
Comment 5 Daniel Kinzler 2012-11-06 16:59:54 UTC
Fix for the preload issue I70656b41. Fix for the move issue to follow.
Comment 6 Daniel Kinzler 2012-11-06 17:07:15 UTC
Hm... will have to think about the moving stuff again. A move generally doesn't create a revision, an automatic conversion would require that. Since moving between content models wasn't part of the original request, I consider this fixed, pending positive review of the patch.
Comment 7 db [inactive,noenotif] 2012-11-11 11:06:26 UTC
*** Bug 41996 has been marked as a duplicate of this bug. ***
Comment 8 Brad Jorsch 2012-11-12 18:33:00 UTC
Patch merged.
Comment 9 Alchimista 2012-12-12 14:02:49 UTC
I've moved all to .css, but the problem still remains: http://pt.wikipedia.org/wiki/Usu%C3%A1ria:Aleth_Bot/Revis%C3%A3o_de_bloqueio
(click on "(+) Para adicionar novo pedido clique aqui.")
Gives: [2a97776e] 2012-12-12 14:01:08: Fatal exception of type MWException
Comment 10 Brad Jorsch 2012-12-12 14:15:04 UTC
That is a different bug (due to the "section=new" in your link), which I've filed as bug 43008.
Comment 11 Krinkle 2013-04-16 01:29:02 UTC
(In reply to comment #3)
> I got the error "The desired destination uses a different content model. Can
> not convert from wikitext to CSS." when I tried to move the page.

That is bug 43049.

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


Navigation
Links