Page MenuHomePhabricator

Redirects don't work after page move (regression)
Closed, ResolvedPublic

Description

This is maybe related to bug 17276: When moving a page over a redirect, the new created redirect (at the old title) isn't working, probably stored with page_is_redirect = 0 (see url).

Apparently the behavior has been introduced with last scap.


Version: 1.15.x
Severity: normal
URL: http://en.wikipedia.org/wiki/Ang_Babaing_Hinugot_sa_Aking_Tadyang

Details

Reference
bz17300

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:29 PM
bzimport set Reference to bz17300.
bzimport added a subscriber: Unknown Object (MLST).

skizzerz wrote:

cannot duplicate on my test wiki running the latest svn rev. It seems wikimedia scapped to r46424, and I did some cleanup of the new redirect code I introduced in r46502. It appears that the changed redirect code from r46502 does not have this regression.

If this regression has indeed been fixed in that later revision, the page will likely remain broken until it is re-moved (moving the original article back and forth should do the trick).

Fixed with one-line patch against r46424.

Index: includes/Article.php

  • includes/Article.php (revision 46424)

+++ includes/Article.php (working copy)
@@ -1274,7 +1274,7 @@

		wfProfileIn( __METHOD__ );

		$text = $revision->getText();
  • $rt = Title::newFromRedirect( $text );

+ $rt = Title::newFromRedirect( $text, false, true );

		$conditions = array( 'page_id' => $this->getId() );
		if( !is_null( $lastRevision ) ) {
  • Bug 17276 has been marked as a duplicate of this bug. ***