Last modified: 2008-10-06 23:51:44 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 9226 - Export should use the table "page_restrictions" and not the field of the table "page"
Export should use the table "page_restrictions" and not the field of the tabl...
Product: MediaWiki
Classification: Unclassified
Export/Import (Other open bugs)
All All
: Normal normal with 5 votes (vote)
: ---
Assigned To: Aaron Schulz
Depends on:
Blocks: code_quality
  Show dependency treegraph
Reported: 2007-03-08 12:21 UTC by Daniel Herding
Modified: 2008-10-06 23:51 UTC (History)
1 user (show)

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

Attempted quick hack to use page_restrictions table (2.83 KB, patch)
2007-03-08 23:18 UTC, Brion Vibber

Description Daniel Herding 2007-03-08 12:21:41 UTC
Spezial:Export is supposed to show that a page is locked. This works for the
main page on de.wikipedia: has the line
<restrictions>edit=sysop:move=sysop</restrictions>, as it is supposed to be. also works fine,
showing this line:

But for other locked or semi-locked pages, this doesn't work: is fully locked, however doesn't have restriction
tags. is semi-locked, but doesn't
have restriction tags either.
Comment 1 Daniel Herding 2007-03-08 12:26:21 UTC
Note that this does not only occur on the German Wikipedia, for example also lacks
restriction tags although is fully
Comment 2 Rotem Liss 2007-03-08 14:55:45 UTC
The export tool seems to use the obsolete "page.page_restrictions" field, while
the table "page_restrictions" is currently used and updated. It should probably
use the table.
Comment 3 Rob Church 2007-03-08 16:46:26 UTC
Marking as blocking bug 700 (code quality) and increasing severity, since it's a
data consistency issue.
Comment 4 Daniel Herding 2007-03-08 17:37:29 UTC
As a note why I noticed this bug: The PyWikipediaBot Framework relies on the
restrictions tag; if missing, the bot will try to edit locked pages with a
non-sysop account, which will lead to an error message.
Comment 5 Brion Vibber 2007-03-08 20:02:04 UTC
The unfortunate thing about this is it's hard to cleanly join on for the bulk
export query. Hmmm, maybe a join with a COUNT(*) and then look up individual
items just for the pages with protection entries?

Need to test to ensure that won't bork up the speed of the query.
Comment 6 Brion Vibber 2007-03-08 23:18:26 UTC
Created attachment 3326 [details]
Attempted quick hack to use page_restrictions table

The query looks ok to me, but what do I know. :)

There's a few issues with this, though...

a) Information drawn from page_restrictions table may be out of sync.
A protected page could perhaps be deleted or have its protection levels changed
between the start of the query and the time the row is read, leading to
slightly inconsistent output if transactions aren't doing the right thing.

b) New features such as expirations and cascade options are not reported.
We should probably think about an expandable schema for protection information
and toss that in.

c) Who knows what else might be wrong. ;)

As for the bot editing case, I have to warn that a page that's protected by
cascade from another page wouldn't end up listing here anyway, so I'm not sure
how much totally we can do here? Maybe something else is best?
Comment 7 Siebrand Mazeland 2008-08-18 18:47:34 UTC
Mass compoment change: <some> -> Export/Import
Comment 8 Aaron Schulz 2008-10-06 23:51:44 UTC
Done in r41786

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