Wow, I can't believe that I actually had a bug in my code /^) But, seriously, the error message is a bit misleading. It should include an attribute like, foruser="John Doe". The cookies weren't being set correctly and so it assumed the edit was by anon. An att, foruser="197.201.33.10" would have offered a clue. It took some debugging of the MW code to figure that out by noticing that the $user in Title.php was not a registered user.
Cheers ________________________________ From: Al Johnson <[email protected]> To: 'MediaWiki announcements and site admin list' <[email protected]> Sent: Friday, February 22, 2013 4:57 PM Subject: Re: [MediaWiki-l] [API] Can't edit with API in custom namespace No, but I just tried with it and still same error. But, 'editsd' is my permission, not a group. Can the 1st array index take a permission name? ________________________________ From: Tom Hutchison <[email protected]> To: 'Al Johnson' <[email protected]>; 'MediaWiki announcements and site admin list' <[email protected]> Sent: Friday, February 22, 2013 3:42 PM Subject: RE: [MediaWiki-l] [API] Can't edit with API in custom namespace Did you set: $wgGroupPermissions['editsd']['writeapi'] = true; Tom -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Al Johnson Sent: Friday, February 22, 2013 5:25 PM To: [email protected] Subject: Re: [MediaWiki-l] [API] Can't edit with API in custom namespace The Special:ListGroupRights correctly shows the Administrators group has my defined permission for the namespace: editsd (editsd) Does this issue look like a bug? ________________________________ From: Al Johnson <[email protected]> To: "[email protected]" <[email protected]> Sent: Friday, February 22, 2013 1:14 PM Subject: Re: [MediaWiki-l] [API] Can't edit with API in custom namespace In short, I CAN edit a page in a custom namespace with the interface, but NOT with the API... using the sysop account. Is there some code I can do a simple check of? I see no prior bugs about this so maybe there is a tricky configuration setting? If I remove the following namespace protection, the API works: $wgNamespaceProtection[NS_SUSDATA] = array( 'editsd' ); But, I need the namespace protection. Thanks, al ________________________________ From: Al Johnson <[email protected]> To: "[email protected]" <[email protected]> Sent: Friday, February 22, 2013 12:47 AM Subject: [API] Can't edit with API in custom namespace I hope someone can help. I have a custom namespace. I can edit via API in the _main_ namespace, thus, my custom bot is logging in, getting edit token, etc.. - API edit code tests good. I can edit via the WEB interface in the _custom_ namespace successfully - security/permissions configed correctly. But, I cannot edit via the API in the _custom_ namespace. So, there is something about editing a custom namespace WITH the api. Error output: <?xml version="1.0"?><api><error code="protectednamespace" info="You're not allowed to edit pages in the "SusData" namespace" /></api> Any ideas? Thanks, al P.S. I can post config stuff if needed. _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
