Example: http://commons.wikimedia.org/wiki/Category:Cultural_heritage_monuments_in_Dari%C3%A9n_Province
This category was created by BotMultichill to extend the category tree. However, querying it using the api will not show the category:
This happens because, while there /is/ a Page row:
mysql> select * from page where page_namespace=14 and page_title>="Cultural_heritage_monuments_in_Dari" limit 1; +----------+----------------+-------------------------------------------------+-------------------+--------------+------------------+-------------+----------------+----------------+-------------+----------+-----------------------+ | page_id | page_namespace | page_title | page_restrictions | page_counter | page_is_redirect | page_is_new | page_random | page_touched | page_latest | page_len | page_no_title_convert | +----------+----------------+-------------------------------------------------+-------------------+--------------+------------------+-------------+----------------+----------------+-------------+----------+-----------------------+ | 21211737 | 14 | Cultural_heritage_monuments_in_Darién_Province | | 0 | 0 | 1 | 0.721362456992 | 20130526075638 | 77704695 | 125 | 0 | +----------+----------------+-------------------------------------------------+-------------------+--------------+------------------+-------------+----------------+----------------+-------------+----------+-----------------------+
there is no entry in the category table:
mysql> select * from category where cat_title>="Cultural_heritage_monuments_in_Dari" limit 1; +----------+------------------------------------------+-----------+-------------+-----------+------------+ | cat_id | cat_title | cat_pages | cat_subcats | cat_files | cat_hidden | +----------+------------------------------------------+-----------+-------------+-----------+------------+ | 64836847 | Cultural_heritage_monuments_in_Darmstadt | 17 | 2 | 15 | 0 | +----------+------------------------------------------+-----------+-------------+-----------+------------+
While, in general, empty categories *do* show up in the result - as long as they have had a page in them in the past.
So, as far as I can see, two things have to be addressed in a patch:
- when a new page in category namespace is created, a row in the category table should be inserted
- the category namespace should be scanned for missing entries in the category table, and those should be added.
Version: 1.22.0
Severity: normal