Last modified: 2011-03-13 18:05:43 UTC
The following command curl 'http://en.wikipedia.org/w/api.php?tllimit=500&format=json&action=query&prop=revisions|templates|images&imlimit=500&rvprop=ids&revids=317439556' returns: { "query": { "pages": { "24520081": { "ns": 2, "pageid": 24520081, "revisions": [ { "parentid": 317439411, "revid": 317439556 } ], "title": "User:Headbomb/Sandbox9" } } } } But http://en.wikipedia.org/w/index.php?oldid=317439556 uses the "cite web" template, which is missing here. It looks like api.php returns the templates used in the current version of an article even if asked for an older version. (We need this to work for the collection extension. also see http://code.pediapress.com/wiki/ticket/703)
(In reply to comment #0) > But http://en.wikipedia.org/w/index.php?oldid=317439556 uses the "cite web" > template, which is missing here. It looks like api.php returns the templates > used in the current version of an article even if asked for an older version. > That is true, we don't store old templatelinks data. The only way to get this would be by reparsing the entire content. I'm not sure whether that is the correct solution.
(In reply to comment #1) > (In reply to comment #0) > > But http://en.wikipedia.org/w/index.php?oldid=317439556 uses the "cite web" > > template, which is missing here. It looks like api.php returns the templates > > used in the current version of an article even if asked for an older version. > > > That is true, we don't store old templatelinks data. Exactly. Moreover, the prop= modules (except for prop=revisions of course) always return data about the latest version of a page rather than the requested revids= . Closing as WONTFIX for this reason. > The only way to get this > would be by reparsing the entire content. I'm not sure whether that is the > correct solution. > Correct or not, it's possible: you can feed a revid to action=parse and you'll get all kinds of data about the parse result, including template and image links. This'll have to do unless and until we start storing historic information in the link tables, which I'm pretty sure will never happen. Also note that parsing the old version of a page will not use any old versions of the templates used in it, so it may produce the 'wrong' result if you're looking for time machine-like functionality.
Thanks for the clarification, that's what I expected. It probably will not matter that much in our use case.