Page MenuHomePhabricator

Use $wgMaxRedirects also when following translusion redirects
Closed, DeclinedPublic


It is not a nice behaviour, when you can reach a template with a wikilink, but not due to transclusion, if you set wgMaxRedirects to a value greater than 1

Please use $wgMaxRedirects also when follow redirects due to transclusion (Parser::statelessFetchTemplate)


Version: 1.20.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:50 PM
bzimport set Reference to bz30357.
bzimport added a subscriber: Unknown Object (MLST).
DannyS712 added a subscriber: DannyS712.

Current code:

# Loop to fetch the article, with up to 1 redirect
for ( $i = 0; $i < 2 && is_object( $title ); $i++ ) {

Suggest replacing the hard-coded 2 with $wgMaxRedirects
Per, Parsing-Team--ARCHIVED is responsible for this - any objections?

The comment would also have to be updated, to wit: # Loop to fetch the article, with up to $wgMaxRedirects-1 redirects (or something similar).