Author: cbm.wikipedia
Description:
If a page is protected via an entry in the page table (instead of the page_restrictions table) and also cascade protected, the API doesn't return protection information about the page itself. This can be seen in the following query, where there are no results without a source= field. The accompanying SQL query shows that the page actually is protected; the user interface verifies en:Template:!! was protected in 2006.
API query demonstrating the problem:
http://en.wikipedia.org/w/api.php?action=query&prop=info&inprop=protection&titles=Template:!!
Results:
<?xml version="1.0" encoding="utf-8"?>
<api>
<query>
<pages>
<page pageid="5994763" ns="10" title="Template:!!" touched="2008-09-05T09:29:45Z" lastrevid="113778948" counter="0" length="65">
<protection>
<pr type="edit" level="sysop" expiry="infinity" source="User:Hersfold/Lockbox" />
<pr type="move" level="sysop" expiry="infinity" source="User:Hersfold/Lockbox" />
</protection>
</page>
</pages>
</query>
</api>
Protection status:
mysql> select * from page left join page_restrictions on page_id = pr_page where page_title = '!!' and page_namespace= 10;
+---------+----------------+------------+-----------------------+--------------+------------------+-------------+----------------+----------------+-------------+----------+---------+---------+----------+------------+---------+-----------+-------+
page_id | page_namespace | page_title | page_restrictions | page_counter | page_is_redirect | page_is_new | page_random | page_touched | page_latest | page_len | pr_page | pr_type | pr_level | pr_cascade | pr_user | pr_expiry | pr_id |
+---------+----------------+------------+-----------------------+--------------+------------------+-------------+----------------+----------------+-------------+----------+---------+---------+----------+------------+---------+-----------+-------+
5994763 | 10 | !! | edit=sysop:move=sysop | 0 | 0 | 0 | 0.189867044892 | 20080905092945 | 113778948 | 65 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | |
+---------+----------------+------------+-----------------------+--------------+------------------+-------------+----------------+----------------+-------------+----------+---------+---------+----------+------------+---------+-----------+-------+
1 row in set (0.00 sec)
Desired behavior: return results without a source= field, as this query does:
http://en.wikipedia.org/w/api.php?action=query&prop=info&inprop=protection&titles=Template:*mp
Version: 1.12.x
Severity: normal