Page MenuHomePhabricator

Missing "continue" element for categories prop when clshow set
Open, MediumPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • No continue element is returned, even though categories have not been fully populated for all articles. Example response (Pastebin).
  • I also note that that response contains 374 categories, even though cllimit=max in the querystring and "limits: { categories: 500 }" is returned in the response.

What should have happened instead?:

  • A continue element should be returned, allowing the user to make follow-up requests to obtain all categories for all requested articles. This was the observed behaviour of my nightly API requests until approximately 27 February 2026.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Current Wikipedia, 1.46.0-wmf.18

Other information (browser name/version, screenshots, etc.):
Associated question on Meta Wiki - a user advised to create a Phabricator issue
Potentially linked issue: T405812: Migrate categorylinks to virtual domain
Suspect code change

Event Timeline

If I don't set clshow=!hidden, then a continue element is returned as expected. The same example query, with no clshow parameter.

Matthew renamed this task from Action API: missing "continue" element for categories prop to Missing "continue" element for categories prop when clshow set.Mar 11 2026, 5:52 PM
HCoplin-WMF subscribed.

Moving to MWI bugs & chores. Categories as a whole is currently unowned, but we can take a look to see if there is something more systemic happening in the query action as a whole.

It seems likely based on the effect and timing that the issue is associated with this change: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1241311 (@Zabe) which changed how categories are filtered.

The impact is:

  • Action API requests with clshow=!hidden or clshow=hidden that correctly returned a continue element until ~27 February 2026 now fail to do so (i.e. this is a regression)
  • the API silently fails to return all categories for a valid request
  • as there is no continue element, the user has no way of knowing that they have not received all requested data, nor any way of retrieving said data without altering their requests

The bug here is that in the old query design the filtering happened while querying, such that after the filtering we had $params['limit'] + 1 results. Now we query $params['limit'] + 1 items and only then do the filtering, such that we can end up with less items (which also causes the continue element from vanishing).