Last modified: 2014-07-14 10:19:39 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 T69878, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67878 - AbstractContent::getRedirectChain doesn't get the full chain
AbstractContent::getRedirectChain doesn't get the full chain
Status: NEW
Product: MediaWiki
Classification: Unclassified
ContentHandler (Other open bugs)
1.24rc
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-11 19:59 UTC by Brad Jorsch
Modified: 2014-07-14 10:19 UTC (History)
1 user (show)

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


Attachments

Description Brad Jorsch 2014-07-11 19:59:29 UTC
To reproduce:

1. Set $wgMaxRedirects to something large (e.g. 10)
2. Create a chain of redirects, Redir5 → Redir4 → Redir3 → Redir2 → Redir1 → Target. Probably easiest to do so in reverse order.
3. Call Revision::newFromTitle( Title::newFromText( 'Redir5' ) )->getContent()->getRedirectChain(), or just observe the results rendered for index.php?title=Redir5&redirect=no

Expected result:

There will be 5 entries in the chain: Redir4, Redir3, Redir2, Redir1, and Target.

Actual result:

There are two entries in the chain: Redir4 and Target

Analysis:

WikiPage::getRedirectTarget is the equivalent of Content::getUltimateRedirectTarget, not Content::getRedirectTarget.

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


Navigation
Links