Page MenuHomePhabricator

redirect on cross-page deletion
Closed, InvalidPublic

Description

This bug is exotic and as far as I know not reproducable on any Wikimedia sites, but I am going to enter it here in case it is helpful to someone else someday.

I was writing a new Special Page for a private wiki. One of the functions of this special page was to perform deletions on other pages and images via direct calls to Article->doDeleteArticle and Image->delete.

After calling either of these functions it appears that a $wgOut->mRedirect gets set to target the deleted page. This interferes with the output of my Special Page by redirecting the content. I've yet to figure out where this is occuring (and it is obviously quite well buried, because I spent a long time looking without success).

The obvious workaround is to cancel the redirect by doing the equivalent of $wgOut->mRedirect = '' after the deletion calls.

It also appears that this bug is not triggered by normal deletions because action=delete is embedded as a process in the normal article and image page views and the redirect is somehow being automatically cancelled if the current Title is the same as that for the hypothetical redirect. (In other words, it doesn't try to issue a redirect if it thinks it is already at the right page.)

Obviously an exotic bug like this isn't much of a priority since it doesn't affect Wikimedia directly, but I felt it was worth posting a note after wasting several hours trying to pin down where the redirect was coming from.


Version: 1.9.x
Severity: minor

Details

Reference
bz12263

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:58 PM
bzimport set Reference to bz12263.
bzimport added a subscriber: Unknown Object (MLST).

Hi Robert! Sorry that nobody has taken a look at this report yet and given feedback.

If this is still a problem in a recent MediaWiki version, is there any chance to get a minimal testcase, e.g. the code of that "Special Page" that you have written?

(In reply to comment #0)

This bug is exotic and as far as I know not reproducable on any Wikimedia
sites, but I am going to enter it here in case it is helpful to someone else
someday.

I was writing a new Special Page for a private wiki. One of the functions of
this special page was to perform deletions on other pages and images via
direct
calls to Article->doDeleteArticle and Image->delete.

After calling either of these functions it appears that a $wgOut->mRedirect
gets set to target the deleted page. This interferes with the output of my
Special Page by redirecting the content. I've yet to figure out where this
is
occuring (and it is obviously quite well buried, because I spent a long time
looking without success).

That is odd sounding. It certainly shouldn't happen (ui should be separate from the actual delete action). A lot has changed in MediaWiki since 2007 in these areas, I wonder if this bug is still present.

Robert: Does this still happen?

Ammarpad subscribed.

I am afraid, there's nothing actionable giving the current description and the age of this task