Hello all,

Right now Semantic Forms SF_AutoeditAPI.php is throwing an exception in 
MediaWiki 1.21. I've been trying to resolve this, and mostly groping around in 
the dark on bug 48838 [1].

This bug causes me a lot of problems since I have a lot of bot activity on 
WikiApiary [2] that uses this API to change properties of pages. I have tracked 
down the stack trace and to me it appears that the issue is that MediaWiki was 
happy to ferry wikitext into something that was outputting json before, but now 
the new ContentHandler actually checks and says no go:

{"error":{"code":"internal_api_error_MWException","info":"Exception Caught: 
Format json is not supported for content model wikitext","*":"

#0 
/srv/www/mediawiki/public_html/w/includes/content/WikitextContentHandler.php(38):
 ContentHandler->checkFormat('json')
#1 /srv/www/mediawiki/public_html/w/includes/content/ContentHandler.php(159): 
WikitextContentHandler->unserializeContent('{{Bookmark?|Tit...', 'json')
#2 /srv/www/mediawiki/public_html/w/includes/EditPage.php(2071): 
ContentHandler::makeContent('{{Bookmark?|Tit...', Object(Title), 'wikitext', 
'json')
#3 /srv/www/mediawiki/public_html/w/includes/EditPage.php(1360): 
EditPage->toEditContent('{{Bookmark?|Tit...')
#4 
/srv/www/mediawiki/public_html/w/extensions/SemanticForms/includes/SF_AutoeditAPI.php(432):
 EditPage->internalAttemptSave(false, false)
#5 
/srv/www/mediawiki/public_html/w/extensions/SemanticForms/includes/SF_AutoeditAPI.php(908):
 SFAutoeditAPI->doStore(Object(EditPage))
#6 
/srv/www/mediawiki/public_html/w/extensions/SemanticForms/includes/SF_AutoeditAPI.php(118):
 SFAutoeditAPI->doAction()
#7 /srv/www/mediawiki/public_html/w/includes/api/ApiMain.php(840): 
SFAutoeditAPI->execute()
#8 /srv/www/mediawiki/public_html/w/includes/api/ApiMain.php(380): 
ApiMain->executeAction()
#9 /srv/www/mediawiki/public_html/w/includes/api/ApiMain.php(351): 
ApiMain->executeActionWithErrorHandling()
#10 /srv/www/mediawiki/public_html/w/api.php(77): ApiMain->execute()
#11 {main}

"}}

I've reviewed the ContentHandler documentation to see if I can override this 
somehow but I can't tell. LiquidThreads had the same exception in bug 41497 
[3]. In that case the change was made in core to resolve, but it also seems 
like the change may have been unrelated.

I'm wondering if any of the awesome folks on this list might now how to make 
ContentHandler look the other way for this or just allow it?

Feel free to reply on this or in bugzilla if you have suggestions. Thanks ahead 
of time!

[1]: https://bugzilla.wikimedia.org/show_bug.cgi?id=48838
[2]: http://wikiapiary.com/
[3]: https://bugzilla.wikimedia.org/show_bug.cgi?id=41497
Jamie Thingelstad
ja...@thingelstad.com
mobile: 612-810-3699
find me on AIM Twitter Facebook LinkedIn

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to