When a file is uploaded, sometimes its not being properly reported by the API for a very long time after the initial upload.
For example, File:DINNER (held by) ? (at) NIAGARA TO THE SEA (SS?;) (NYPL Hades-274181-468456).jpg looked like this 15 hours after upload:
{ "batchcomplete": "", "query": { "pages": { "48145796": { "pageid": 48145796, "ns": 6, "title": "File:DINNER (held by) ? (at) NIAGARA TO THE SEA (SS?;) (NYPL Hades-274181-468456).jpg" } } } }
Even purging the page does not help. However, making a null edit does in fact always fix it:
{ "batchcomplete": "", "query": { "pages": { "48145796": { "pageid": 48145796, "ns": 6, "title": "File:DINNER (held by) ? (at) NIAGARA TO THE SEA (SS?;) (NYPL Hades-274181-468456).jpg", "categories": [ { "ns": 14, "title": "Category:Buttolph collection of menus" }, { "ns": 14, "title": "Category:Images from the New York Public Library" }, { "ns": 14, "title": "Category:Images uploaded by F\u00e6" }, { "ns": 14, "title": "Category:Media needing category review as of 12 April 2016" }, { "ns": 14, "title": "Category:PD-scan (PD-1923)" }, { "ns": 14, "title": "Category:PD 1923" } ] } } } }
It looks like this has been occurring for over a year (link). It is causing tools to incorrectly report the categories of files; for example, see the number of false positives on this page .