Last modified: 2010-05-15 15:37:19 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 T5339, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 3339 - Redirected from (using ?rdfrom=...) is not shown when page is cached
Redirected from (using ?rdfrom=...) is not shown when page is cached
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.5.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-02 21:47 UTC by Dave Miller (ProgMania)
Modified: 2010-05-15 15:37 UTC (History)
1 user (show)

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


Attachments

Description Dave Miller (ProgMania) 2005-09-02 21:47:50 UTC
Problem:
When $wgRedirectSources is enabled, the 'Redirected from ...' line is not shown if the page is 
cached.

Reason (as far as I can tell):
In includes/Article.php, the part about redirects (starting '} elseif ( !empty( $rdfrom ) ) {') is 
inside the 'if ( !$outputDone ) {' (if not cached) section but the redirected from line is not 
cached (because it changes).

Quick Fix:

Change:
if ( $wgOut->tryParserCache( $this, $wgUser ) ) {
	$outputDone = true;
}

To:
if ( $wgOut->tryParserCache( $this, $wgUser ) ) {
	if ($rdfrom) {
		$sk = $wgUser->getSkin();
		$redir = $sk->makeExternalLink( $rdfrom, $rdfrom );
		$s = wfMsg( 'redirectedfrom', $redir );
		$wgOut->setSubtitle( $s );
	}
	$outputDone = true;
}
Comment 1 Aaron Schulz 2008-09-27 23:56:11 UTC
No longer the case it seems

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


Navigation
Links