Last modified: 2008-09-09 20:42:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 15535 - inprop=protection lists cascade protections before pre-1.10 protections
inprop=protection lists cascade protections before pre-1.10 protections
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.12.x
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-09 12:42 UTC by CBM
Modified: 2008-09-09 20:42 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description CBM 2008-09-09 12:42:44 UTC
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
Comment 1 CBM 2008-09-09 20:34:31 UTC
The query I reported above, 

http://en.wikipedia.org/w/api.php?action=query&prop=info&inprop=protection&titles=Template

now returns:

<?xml version="1.0" encoding="utf-8"?>
<api>
<query>
<pages>
<page pageid="237862" ns="0" title="Template" touched="2008-09-06T22:42:09Z" lastrevid="236742124" counter="1" length="2341">        
<protection />      
</page>    
</pages>
</query>
</api>

The page is still protected:

mysql> select * from page left join page_restrictions on page_id = pr_page where page_namespace = 10 and page_title = '!!';
+---------+----------------+------------+-----------------------+--------------+------------------+-------------+----------------+----------------+-------------+----------+---------+---------+----------+------------+---------+-----------+-------+
| 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)

And the page is still cascade protected, according to the enwiki user interface.
Comment 2 Roan Kattouw 2008-09-09 20:36:57 UTC
(In reply to comment #1)
> The query I reported above, 
> 
> http://en.wikipedia.org/w/api.php?action=query&prop=info&inprop=protection&titles=Template
Specifying the right title ([[Template:!!]] as opposed to [[Template]]) helps.
Comment 3 CBM 2008-09-09 20:41:42 UTC
Sorry about that; didn't realize bugzilla trims !! off the link. I'm embarrassed. 
Comment 4 Roan Kattouw 2008-09-09 20:42:58 UTC
Fixed in r40678.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links