https://bugzilla.wikimedia.org/show_bug.cgi?id=48824
Web browser: ---
Bug ID: 48824
Summary: Creating a page in category namespace does not insert
row in category table.
Product: MediaWiki
Version: 1.22-git
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Categories
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Mobile Platform: ---
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:
http://commons.wikimedia.org/w/api.php?action=query&list=allcategories&acprop=hidden&acfrom=Cultural%20heritage%20monuments%20in%20Dari
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:
1) when a new page in category namespace is created, a row in the category
table should be inserted
2) the category namespace should be scanned for missing entries in the
category table, and those should be added.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l