Last modified: 2012-01-06 23:32:50 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 T35554, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33554 - Documentation of $wgDebugRedirects doesn't clearly state it's about HTTP redirects
Documentation of $wgDebugRedirects doesn't clearly state it's about HTTP redi...
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Documentation (Other open bugs)
1.18.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-06 10:50 UTC by Alexey Pakseykin
Modified: 2012-01-06 23:32 UTC (History)
4 users (show)

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


Attachments

Description Alexey Pakseykin 2012-01-06 10:50:25 UTC
Setting "$wgDebugRedirects = true" in "LocalSettings.php" does not work as it described by the documentation:
http://www.mediawiki.org/wiki/Manual:$wgDebugRedirects
If redirected page is accessed using original URL, the redirect still happens automatically.

It is either (1) problem with the code or (2) lack of explanation in documentation.

STEPS TO REPRODUCE:

1. I have a MediaWiki instance installed into (similar) URL:
http://example.com/content/

2. I created a page which is directly accessible through:
http://example.com/content/index.php?title=Initial

3. Then I redirected (moved leaving a redirect) the page giving it new name:
http://example.com/content/index.php?title=Moved

4. Then I enabled ("$wgDebugRedirects = true;" in LocalSettings.php) the feature to disable automatic redirects. According to the documentation, this should disable redirects and show new location instead.

4.1 EXPECTED RESULT:
In the example above, when I enter the first URL, the wiki engine should not show content of the page. It should simply show a some kind of auto-message with a link to the new "Moved" page.

4.2 OBSERVED RESULT:
When the first URL is used, the wiki engine still redirects the page showing its content. In other words, it behaves as if there were no changes to "$wgDebugRedirects" variable.
Comment 1 Niklas Laxström 2012-01-06 10:52:45 UTC
The case you describe isn't actually a redirection. The setting only affects real HTTP redirects.
Comment 2 Alexey Pakseykin 2012-01-06 11:12:23 UTC
Niklas, let me elaborate on this as I understand it.

If the following is correct, the bug can be closed. But I think documentation
should be clarified then. What I was trying to do is to disable the "Wiki logic
level" redirects.

--- HTTP level
The "$wgDebugRedirects" variable controls the action when MediaWiki is about to
generate 301 HTTP reply:
* When "$wgDebugRedirects = false" (default), it actually generates HTTP 301
reply to trigger redirection.
* When "$wgDebugRedirects = true", it generates regular HTTP 200 reply
(success) providing web page with link.

--- Wiki logic level
Word "redirect" in MediaWiki has additional meaning: provide content of the
page normally accessed through a different name. In the case of such redirect, no
HTTP 301 reply is attempted, and MediaWiki simply provides content of another
page right away using HTTP 200 reply.
Comment 3 Bawolff (Brian Wolff) 2012-01-06 23:32:50 UTC
Documentation clarified (yay its a wiki!)

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


Navigation
Links