Last modified: 2009-04-16 20:10:56 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 T19155, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17155 - Category counter not updated on article deletion
Category counter not updated on article deletion
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/Category...
:
Depends on:
Blocks: 18488
  Show dependency treegraph
 
Reported: 2009-01-25 21:20 UTC by P.Copp
Modified: 2009-04-16 20:10 UTC (History)
2 users (show)

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


Attachments
Proposed fix: Move updateCategoryCounts() up a few lines (1.32 KB, patch)
2009-02-10 15:24 UTC, P.Copp
Details

Description P.Copp 2009-01-25 21:20:25 UTC
In Article::doDeleteArticle(), the code for updating the category counters is executed after the delete on the categorylinks table, so the query

>		# Fix category table counts
>		$cats = array();
>		$res = $dbw->select( 'categorylinks', 'cl_to', array( 'cl_from' => $id ), __METHOD__ );

will never return a result. Thus, the category counters aren't updated at all on article deletions.
Comment 1 P.Copp 2009-02-10 15:24:51 UTC
Created attachment 5796 [details]
Proposed fix: Move updateCategoryCounts() up a few lines
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2009-02-16 16:55:17 UTC
Thanks for the report.  This was inexplicably broken in r41018.  I reverted the bad parts of that in r47318, backported to 1.14 in r47319.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2009-02-16 16:58:28 UTC
(In reply to comment #2)
> bad parts of that in r47318, backported to 1.14 in r47319.

That should be r47319 and r47320 respectively.
Comment 4 Aaron Schulz 2009-02-16 17:58:09 UTC
Note that r41018 only moved the step below the RC row deletion and Article::onArticleDelete( $this->mTitle ) steps. r47319 Just reverted this.

The *above* patch moves this up before the page row deletion and more importantly before:

$dbw->delete( 'categorylinks', array( 'cl_from' => $id ) );

This seems to be actually broken by r40912.

Restored in r47326

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


Navigation
Links