Last modified: 2011-04-30 01:20:52 UTC
Using the API to parse a page is not working properly. My query string looks like this: /api.php?action=parse&page=Houdini It returns this response: <?xml version="1.0"?> <api> <error code="params" info="The page parameter cannot be used together with the text and title parameters" xml:space="preserve"> I am using mw 1.15.1 i get nothing of value from the mw debug log and i have verified that my rewrite rules are not adding the title parameter. If i change my query string to this: /api.php?action=parse&text={{Houdini}} I get the expected result. (see http://www.mediawiki.org/w/index.php?title=Talk:API:Parsing_wikitext&diff=prev&oldid=297592 for more info)
http://en.wikipedia.org/w/api.php?action=parse&page=Houdini http://en.wikipedia.org/w/api.php?action=parse&text={{Houdini}} WFM on wmf, and same on SVN Head. Are you sure it's not your re-writes?
WORKSFORME on REL1_15 as well.
en.wikipedia.org is running version "1.16alpha-wmf". Here's an example of how it doesn't work on my site (which runs 1.15.1): http://tmbw.net/wiki/api.php?action=parse&page=Sandbox Can you give me more information about what you mean "re-writes"? Are you talking about rewrites in .htaccess? Can you explain how those would potentially affect this? Thanks
(In reply to comment #3) > en.wikipedia.org is running version "1.16alpha-wmf". > Yes, it's possible the bug was fixed between 1.15 and the 1.16alpha version Wikipedia runs. If that's the case we're still gonna do nothing: 1.16 will be released soonish anyway. > Here's an example of how it doesn't work on my site (which runs 1.15.1): > http://tmbw.net/wiki/api.php?action=parse&page=Sandbox > > Can you give me more information about what you mean "re-writes"? Are you > talking about rewrites in .htaccess? Yes. > Can you explain how those would > potentially affect this? > They could (wrongly) add a &title= parameter to the rewritten URL. Some quick research seems to confirm this: POSTing to http://twbw.net/wiki/api.php?action=rollback throws an error about the user param not being set, while the code checks for the title parameter first. Re-closing as INVALID, the above is fairly strong evidence that this is not a MediaWiki bug, but a problem with your rewrite rules.
Ok, thanks everyone