Last modified: 2009-07-16 20:00:06 UTC
I am making a successful edit call to the api page, however the page 'Wiki/api.php' is createdand/or modified upon calls to the api via a post request some code: def updatePage(): now = datetime.datetime.now() data = [ ('action','edit'), ('title','User:Gcallaghan'), #('pageid','97859'), ('section','new'), ('summary','test'), ('text',now), ('token',EDIT_TOKEN), ('format','xml'), ] query = '&'.join(map(lambda x: '%s=%s'% x,data)) #print "EDIT_TOKEN: %s" % EDIT_TOKEN #print WIKI_API url = urllib.urlencode(data) print url req = urllib2.Request('%s?%s'%(WIKI_API,url)) response = urllib2.urlopen(req, urllib.urlencode(data)) print response.geturl() return response getting the edit token ... {'lastrevid': '897567', 'pageid': '97859', 'title': 'User:Gcallaghan', 'counter': '14', 'edittoken': '+\\', 'length': '13', 'touched': '2009-07-14T18:28:06Z', 'new': '', 'ns': '2'} constructed url arguments ... https://wiki.eng.<private domain>/wiki/api.php?action=edit&title=User%3AGcallaghan§ion=new&summary=test&text=2009-07-16+12%3A53%3A26.737674&token=%2B%5C&format=xml and the response ... <?xml version="1.0" encoding="utf-8"?><api><edit result="Success" pageid="98255" title="Wiki/api.php" oldrevid="903116" newrevid="903118" /></api>
This sounds like some kind of creepy rewrite rule bug. Am I right that /wiki/Foo rewrites to /wiki/index.php?title=Foo ? In that case rearrange your URL structure so that the virtual path and the real path don't overlap, by keeping the virtual path at /wiki/Foo and moving the real one to e.g. /w/index.php?title=Foo .