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":
- WORKS: ?action=query&prop=categories&clprop=sortkey|timestamp|hidden
- FAILS: ?action=query&prop=categoryinfo&generator=categories&gclprop=sortkey|timestamp|hidden
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).