Last modified: 2011-04-14 15:14:25 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 T19170, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17170 - Whatlinkshere doesn't reflect changes in templates
Whatlinkshere doesn't reflect changes in templates
Status: NEW
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
unspecified
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-27 05:03 UTC by Andrew Howse
Modified: 2011-04-14 15:14 UTC (History)
4 users (show)

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


Attachments

Description Andrew Howse 2009-01-27 05:03:25 UTC
When disambiguating links to disambiguation pages, whatlinkshere doesn't reflect changes to transcluded templates for long periods, e.g. several days. To the best of my recall, this hasn't always been the case.
For example, Special:Whatlinkshere/Defender on en.wiki list many pages on which Template:Serbia-footy-defender-stub is transcluded, even though that template no longer links to Defender, since 12/31/08.
Comment 1 Chad H. 2009-01-27 14:46:42 UTC
Job queue says 1.2mil entries in it right now. I'm inclined to think they're in that queue somewhere, and just haven't been processed yet.
Comment 2 od_mishehu 2009-02-03 09:47:13 UTC
But should it take over a month? In less than a minute, the Job Queue went down from 1.2 mil to 1 mil; this should mean that anything in the job queue should be gone within about 6 minutes.
Comment 3 P.Copp 2009-02-03 11:01:22 UTC
(In reply to comment #2)
> In less than a minute, the Job Queue went down
> from 1.2 mil to 1 mil; this should mean that anything in the job queue should
> be gone within about 6 minutes.
> 
That was probably an illusion. The figure on Special:Statistics is a rough estimate of the real figure, it depends mainly on the db slave you're hitting. en.wikipedia currently uses about 7 slave servers, so you can very well get 7 totally different values, when you reload Special:Statistics a few times.
Comment 4 od_mishehu 2009-02-04 06:24:48 UTC
What would be a reasonable time frame for the queue to be completed? 
Comment 5 Nikola Kovacs 2010-02-16 22:49:19 UTC
I can confirm this bug. I tested this on my home wiki which doesn't have memcached, a wiki which does and where I was able to run runJobs.php to ensure it's not in the job queue, and MediaWiki.org where the job queue was 0 according to statistics.

What I did:
create http://www.mediawiki.org/wiki/User:Nx/backlink
create a template without the link: http://www.mediawiki.org/w/index.php?title=User:Nx/template&diff=prev&oldid=303631 
Put this template on a page: http://www.mediawiki.org/wiki/User:Nx/test

Then I added a link to User:Nx/backlink to the template: http://www.mediawiki.org/w/index.php?title=User:Nx/template&diff=next&oldid=303631&

After this, whatlinkshere still only shows the template, and not the page it is included on: http://www.mediawiki.org/wiki/Special:WhatLinksHere/User:Nx/backlink

This only happens when $wgMainCacheType = CACHE_MEMCACHED; setting it to CACHE_NONE; results in immediate updates to whatlinkshere.

I also checked the database while doing this. When I changed the template, the page that transcluded it  did not get added to the pagelinks table until I edited that page. Purging the page did not work, but a null edit (that doesn't get saved as a separate revision) did.
Comment 6 Nikola Kovacs 2010-02-18 15:33:57 UTC
While looking around in the code, I found out that in RefreshLinksJob2::run the variable $start had a value equal to the article id that links to the template, while $end was 0.

Because the sql query conditions are 
  "tl_from >= '$start'",
  "tl_from <= '$end'", 

(this is MW 1.14, but MW 1.15's BacklinkCache::getLinks has a similar sql query), this resulted in no rows being returned, instead of the one row that should be returned. I fixed this and now it works.
Comment 7 Happy-melon 2010-02-18 15:55:54 UTC
(In reply to comment #6)
> (this is MW 1.14, but MW 1.15's BacklinkCache::getLinks has a similar sql
> query), this resulted in no rows being returned, instead of the one row that
> should be returned. I fixed this and now it works.

Fixed how?  Do you have a patch?
Comment 8 Nikola Kovacs 2010-02-18 16:22:24 UTC
Actually, I was wrong, BacklinkCache:getLinks looks correct:

if ( $startId ) {
	$conds[] = "$fromField >= " . intval( $startId );
}
if ( $endId ) {
	$conds[] = "$fromField <= " . intval( $endId );
}

(I did something similar to MW1.14)
and now it works on both MediaWiki.org and my MW1.15 test wiki. This is confusing

Another thing that may or may not be related: putting categories on the doc subpage of a template (that's included on the template using {{documentation}}), does not update the category membership of the page. See http://www.mediawiki.org/wiki/User:Nx/template2 and http://www.mediawiki.org/wiki/Category:Test

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


Navigation
Links