Last modified: 2014-08-05 01:11:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30751, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28751 - prop=info&inprop=protection sometimes shows protection multiple times
prop=info&inprop=protection sometimes shows protection multiple times
Status: NEW
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.18.x
All All
: Lowest trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/w/api.php?act...
:
: 62247 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-29 21:23 UTC by db [inactive,noenotif]
Modified: 2014-08-05 01:11 UTC (History)
9 users (show)

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


Attachments

Description db [inactive,noenotif] 2011-04-29 21:23:27 UTC
The url shows:
        <protection>
          <pr type="edit" level="sysop" expiry="infinity" />
          <pr type="edit" level="sysop" expiry="infinity" />
          <pr type="move" level="sysop" expiry="infinity" />
          <pr type="move" level="sysop" expiry="infinity" />
          <pr type="edit" level="sysop" expiry="infinity" />
          <pr type="move" level="sysop" expiry="infinity" />
        </protection>

Why get each type added three times to the output?

It is not better to get it unique?

Thanks.
Comment 1 Sam Reed (reedy) 2011-04-29 21:39:40 UTC
I'm not sure why it'd be "better" to get them unique.

http://en.wikipedia.org/wiki/%s say's it's a bad request

Using the page id... A direct SQL query only gives me 2 results, being one after the other protections, both edit=sysop:move=sysop

3 edit and 3 move is weird

http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=&user=&page=%25s&year=&month=-1&tagfilter=&hide_patrol_log=1&hide_review_log=1

(show/hide) 22:45, 12 November 2006 Ral315 (Talk | contribs | block) protected "%s" ‎ (No real article can be written here, and it's used by Firefox users to search. No need to edit further. [edit=sysop:move=sysop])



It seems to be a weird edge case. I dunno, seems something we shouldn't really care about/bother filtering (ie WONTFIX)
Comment 2 Roan Kattouw 2011-04-29 21:43:22 UTC
Looking at the database it's got restrictions both in the page.page_restrictions field (old style) and in the page_restrictions table (new style). Where the third pair comes from I don't know.
Comment 3 Sam Reed (reedy) 2011-04-29 21:44:43 UTC
Unless it's creating something for the rows with both, making the third row with double restrictions?
Comment 4 db [inactive,noenotif] 2011-04-30 06:01:00 UTC
The problem is, that updateRestriction.php only copy the page_restriction and does not remove it from page table. That sounds like space waste.

When a wiki has never run updateRestriction.php the api shows no protection with prop=info&siprop=protection. That is because old restrictions are only check for pages with new protection, useless when updateRestriction.php was run.

But the problem for this bug is, that the table page_restrictions contains two rows for one page, one for edit and one for move, for each of that both old protection are added

type="edit" -> new style, from table page_restrictions
type="edit" -> old style, from page.page_restrictions
type="move" -> old style, from page.page_restrictions
type="move" -> new style, from table page_restrictions
type="edit" -> old style, from page.page_restrictions
type="move" -> old style, from page.page_restrictions
Comment 5 db [inactive,noenotif] 2012-08-19 15:37:16 UTC
(In reply to comment #4)
> The problem is, that updateRestriction.php only copy the page_restriction and
> does not remove it from page table. That sounds like space waste.
> When a wiki has never run updateRestriction.php the api shows no protection
> with prop=info&siprop=protection. That is because old restrictions are only
> check for pages with new protection, useless when updateRestriction.php was
> run.
> But the problem for this bug is, that the table page_restrictions contains two
> rows for one page, one for edit and one for move, for each of that both old
> protection are added
> type="edit" -> new style, from table page_restrictions
> type="edit" -> old style, from page.page_restrictions
> type="move" -> old style, from page.page_restrictions
> type="move" -> new style, from table page_restrictions
> type="edit" -> old style, from page.page_restrictions
> type="move" -> old style, from page.page_restrictions

That is better after I52111f30, because the values from page.page_restrictions not repeated a second time, but dupes still exist.
Comment 6 Brad Jorsch 2014-03-05 17:03:04 UTC
*** Bug 62247 has been marked as a duplicate of this bug. ***

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


Navigation
Links