Watchlist says "120000 total pages edited since cutoff"
Closed, ResolvedPublic

Description

Author: Aphaia

Description:
Special pages bug, Wikimedia site specific or bug of MediaWiki 1.4.0

Watchlist says "120000 total pages edited since cutoff" not depending the real
number of edits. Found on English Wikiquote and Japaense Wikipedia. Perhaps on
other sites, too.


Version: unspecified
Severity: normal

Details

Reference
bz1778
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz1778.
bzimport created this task.Mar 29 2005, 9:02 PM

michael wrote:

This is due to a developer error - the watchlist queries have been
removed to save time, and instead been replaced with an estimate
that says 40000*days edits.

The bug is in SpecialWatchlist.php:

// Excessively expensive query removed and replace

with an
estimate that's roughly the same on en.wikipedia.org

// Query below was more expensive than the real

watchlist
queries

/*
$docutoff = "AND cur_timestamp > '$cutoff'";
$sql = "SELECT COUNT(*) AS n FROM $cur WHERE

cur_timestamp>'$cutoff'";

$res = $dbr->query( $sql, $fname );
$s = $dbr->fetchObject( $res );
$npages = $s->n;
*/
$npages = 40000 * $days;

To fix, remove $npages = 40000 * $days; and un-comment the code
directly above.

crestfall wrote:

I suggest that only the line:

$docutoff = "AND cur_timestamp > '$cutoff'";

be uncommented. This will disable the count query but unbork the SQL.

j.overmars wrote:

on our wiki (display notices enabled in PHP) there is also a notice displayed:
"undefined variable: docutoff in <strong>C:\WWW\wiki\includes\SpecialWatchlist.php</strong> on line <strong>173</strong>"

Michael.Keppler wrote:

In 1.5 CVS the page count is calculated by a query again, therefore closing as
FIXED.

The whole bit's rather crappy and needs cleanup and merging of fixes from live branch,
reopening.

jeffq wrote:

en:Wikiquote has just been updated to 1.5beta1, and not only does this problem
still exist there, but Special:Watchlist user watchlist count now erroneously
includes talk pages, even though it explicitly says "not counting talk pages".

brion added a comment.Dec 12 2005, 2:59 AM

This debug message got removed some while ago. Resolving FIXED.

Add Comment