Last modified: 2014-11-08 15:43:35 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 T29683, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27683 - Display error when user tries to create a circular redirect (self-redirect)
Display error when user tries to create a circular redirect (self-redirect)
Status: NEW
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.22.0
All All
: Low enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
gci2014
: easy
: 34932 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-24 15:47 UTC by MZMcBride
Modified: 2014-11-08 15:43 UTC (History)
9 users (show)

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


Attachments

Description MZMcBride 2011-02-24 15:47:26 UTC
I accidentally created a redirect recently at page "Foo" containing the text "#REDIRECT [[Foo]]". I was tired and it took me a few minutes to realize I'd screwed up. Ideally, this type of error would be caught by MediaWiki on page save.
Comment 1 Jan Paul Posma 2011-04-23 15:22:28 UTC
The view that you get when visiting [[Foo]] quite clearly shows the mistake:

Foo
===

(Redirected from Foo)
-> Foo

I don't think we can and should protect from every possible mistake caused by tiredness. ;)
Comment 2 Mark A. Hershberger 2011-04-23 15:35:31 UTC
(In reply to comment #1)
> I don't think we can and should protect from every possible mistake caused by
> tiredness. ;)

In fact, this one seems to already have adequate protection.
Comment 3 MZMcBride 2011-04-23 16:12:51 UTC
(In reply to comment #2)
> (In reply to comment #1)
>> I don't think we can and should protect from every possible mistake caused by
>> tiredness. ;)
> 
> In fact, this one seems to already have adequate protection.

What do you mean by protection?

I don't think there's a ever a reason to allow this behavior. (The fact that making a redirect needs a proper input form is a separate issue.) There should be a warning at least here, though I don't see any problem with an outright ban.

In general, I'm in favor of MediaWiki being more descriptive about things that don't work. This is already somewhat implemented for things such as broken references (they're categorized and have a visible error message), but there should be a larger set of changes made to make MediaWiki less obscure and confusing. This is part of that.

Perhaps linking this bug to a bug about implementing a proper UI for creating a redirect makes sense. I think any redirect-making input form would catch this type of error, but it makes less sense in the current giant textarea mode.
Comment 4 Mark A. Hershberger 2011-04-23 18:33:46 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > In fact, this one seems to already have adequate protection.
> 
> What do you mean by protection?

I mean, MW doesn't end up in an infinite loop.  It does have a silly redirect, but that is pretty minor.

> Perhaps linking this bug to a bug about implementing a proper UI for creating a
> redirect makes sense.

I'm not against doing that if you know of such a bug.
Comment 5 MZMcBride 2011-04-23 21:51:04 UTC
(In reply to comment #4)
> (In reply to comment #3)
>> (In reply to comment #2)
>>> In fact, this one seems to already have adequate protection.
>> 
>> What do you mean by protection?
> 
> I mean, MW doesn't end up in an infinite loop.  It does have a silly redirect,
> but that is pretty minor.

Well, yeah. But I think the goal should be a bit loftier than "doesn't completely explode." ;-)

>> Perhaps linking this bug to a bug about implementing a proper UI for creating a
>> redirect makes sense.
> 
> I'm not against doing that if you know of such a bug.

The closest bug that I know of off-hand is bug 27311, but that is more specific to page creation (i.e., pages with content, not redirects). Perhaps a separate bug is needed for a "create a redirect" UI in core (there are already extensions that can do this).
Comment 6 MZMcBride 2012-10-25 01:16:37 UTC
*** Bug 34932 has been marked as a duplicate of this bug. ***
Comment 8 SJ 2013-04-22 20:36:30 UTC
(In reply to comment #7)
> Another example:
> <https://meta.wikimedia.org/w/index.
> php?title=Wikimedia_user_group&oldid=5413973>.

Just happened to me.  The annoying thing about having no error is that it's hard for either the creator (who thought they were doing something else) or a patroller (unless they followed a link to the page and see that it goes nowhere) to catch.
Comment 10 MZMcBride 2014-06-23 15:51:21 UTC
https://en.wikipedia.org/w/index.php?title=National_Labor_Relations_Board_v._Canning&oldid=614106762

I don't think catching self-redirects should be very difficult to do. I've marked this bug with the "easy" keyword accordingly.
Comment 11 Inkowik 2014-08-03 18:15:58 UTC
We just had a discussion on dewiki about this:

http://de.wikipedia.org/w/index.php?oldid=132749388#Weiterleitungsseiten_die_auf_sich_selbst_verlinken
Comment 12 Bartosz Dziewoński 2014-11-08 15:36:06 UTC
We could just append a red error message at the end of the redirect page, like we usually do for invalid constructs.
Comment 13 Jesús Martínez Novo (Ciencia Al Poder) 2014-11-08 15:43:35 UTC
Another idea to display the error is on page save, like:
* When you don't provide a edit summary and you have "forceeditsummary" turned on in your preferences.
* When you get a warning about possible lost session (token mismatch)
* When your edit matches an Abuse filter rule.

You get a warning, and the page is not saved: you're still in the edit area. But you can press the save button again to save it permanently. That lets you realize about the problem before actually saving the edit.

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


Navigation
Links