Page MenuHomePhabricator

Make generator=categories properties work when used with prop=categoryinfo
Closed, DeclinedPublic

Description

prop=categories specifies three properties (clprop) for retrieval of additional information: sortkey, timestamp, hidden. None of them works when used as a generator for categoryinfo; that is, for plwiktionary's article "rescate":

The point of this is to retrieve information about the size of any category a page is in and its sortkey. I'd expect to accomplish it with one single API query like the latter; however, gclprop parameters are not respected. The current workaround consists in performing two API requests: the first one queries the sortkeys (prop=categories) and the second gets any additional information like size, subcats, etc. (prop=categoryinfo with generator=categories).

Event Timeline

Anomie subscribed.

Generators don't produce results, they produce a set of pages for other modules.

prop=categoryinfo produces information about a category itself, not about the presence of the category in its parent categories or the status of any particular page in the category. Thus the sortkey and timestamp properties make no sense here. hidden is already included in the output of categoryinfo, because it doesn't depend on which parent category you're looking at.

Thank you for the quick response and explanation. In case someone gets confused, those restrictions become evident when the generator= query is applied to more than one title.