Hi,
it seems that documentation about action=edit https://www.mediawiki.org/wiki/API:Edit doesn't cover all possible results. I just found that when I tried to save a page which contains an URL to a blacklisted site (when trying to remove the nowiki tags around an URL in an article on frwiki https://fr.wikipedia.org/w/index.php?title=Ruud_Jolie&oldid=106287645). My program, WPCleaner, didn't warn me of a problem because the answer was not in a format described in the doc: <?xml version="1.0" encoding="UTF-8"?> <api batchcomplete=""> <query> <pages> <page ns="1" title="Discussion:Ruud Jolie/À faire" missing="" contentmodel="wikitext" pagelanguage="fr"> <protection /> <restrictiontypes> <rt>create</rt> </restrictiontypes> </page> </pages> </query> </api>
Is this normal ? Are there other formats for answers ? The documentation only covers answers in the format api/edit/result or the classic error reporting mechanism.
I ended up manually removing the entire link https://fr.wikipedia.org/w/index.php?title=Ruud_Jolie&diff=113608629&oldid=106287645 .
Thanks, Nico
On Mon, Apr 6, 2015 at 4:47 PM, Nicolas Vervelle nvervelle@gmail.com wrote:
it seems that documentation about action=edit https://www.mediawiki.org/wiki/API:Edit doesn't cover all possible results.
The result you quoted is not a response from action=edit. It appears to be from action=query with prop=info&inprop=protection:
https://fr.wikipedia.org/w/api.php?titles=Discussion:Ruud%20Jolie/%C3%80%20f...
<?xml version="1.0" encoding="UTF-8"?>
<api batchcomplete=""> <query> <pages> <page ns="1" title="Discussion:Ruud Jolie/À faire" missing="" contentmodel="wikitext" pagelanguage="fr"> <protection /> <restrictiontypes> <rt>create</rt> </restrictiontypes> </page> </pages> </query> </api>
On Mon, Apr 6, 2015 at 10:56 PM, Brad Jorsch (Anomie) <bjorsch@wikimedia.org
wrote:
On Mon, Apr 6, 2015 at 4:47 PM, Nicolas Vervelle nvervelle@gmail.com wrote:
it seems that documentation about action=edit https://www.mediawiki.org/wiki/API:Edit doesn't cover all possible results.
The result you quoted is not a response from action=edit. It appears to be from action=query with prop=info&inprop=protection:
Oh, stupid me, I didn't activate the correct dump... With the correct dump, I see that the problem is probably on my side.
Sorry for the disturbance Nico
mediawiki-api@lists.wikimedia.org