Last modified: 2014-11-08 15:43:35 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.
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. ;)
(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.
(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.
(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.
(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).
*** Bug 34932 has been marked as a duplicate of this bug. ***
Another example: <https://meta.wikimedia.org/w/index.php?title=Wikimedia_user_group&oldid=5413973>.
(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.
https://www.mediawiki.org/w/index.php?title=CirrusSearch&oldid=712205
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.
We just had a discussion on dewiki about this: http://de.wikipedia.org/w/index.php?oldid=132749388#Weiterleitungsseiten_die_auf_sich_selbst_verlinken
We could just append a red error message at the end of the redirect page, like we usually do for invalid constructs.
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.