Last modified: 2014-07-31 12:25:39 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 T9102, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7102 - Interwiki redirects are not allowed within one server
Interwiki redirects are not allowed within one server
Status: NEW
Product: MediaWiki
Classification: Unclassified
Redirects (Other open bugs)
unspecified
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-23 11:33 UTC by Rotem Liss
Modified: 2014-07-31 12:25 UTC (History)
6 users (show)

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


Attachments

Description Rotem Liss 2006-08-23 11:33:35 UTC
If I set up two wikis in one server and link them using interwiki links
(iw_local=1), the redirect http://domain.com/wiki1/index.php/wiki2:Main_Page
does not work (I get "Bad title" error) and vice versa. However, if I set up two
wikis in two servers and link *them* using interwiki links (iw_local=1), the
redirect http://wiki1.domain.com/index.php/wiki2:Main_Page *does* work. The
problem is caused by line 141 of Wiki.php, when the following "if" statement is
used to choose whether to redirect, or to show a "Bad title" error message:

/* Check for a redirect loop */
if ( !preg_match( '/^' . preg_quote( $this->getVal('Server'), '/' ) . '/', $url
) && $title->isLocal() )

$url is the redirected URL, and the if statement checks if we redirect within
the same server. It's good for Wikimedia sites, but not good for sites which use
two wikis in one server. Why is this check necessary at all? Which URL can cause
a redirect loop?
Comment 1 Chad H. 2009-08-17 22:29:32 UTC
Are you putting relative paths in the interwiki table? If so, this is probably bug 18664.
Comment 2 Rotem Liss 2009-08-30 06:43:09 UTC
(In reply to comment #1)
> Are you putting relative paths in the interwiki table? If so, this is probably
> bug 18664.
> 

No, the URLs are absolute. The bug still exists. The line in includes/Wiki.php is now 196.
Comment 3 Dan Collins 2011-07-12 03:52:02 UTC
+testme
Comment 4 This, that and the other (TTO) 2014-07-31 12:25:39 UTC
Relevant code is now on line 236 of includes/MediaWiki.php.

Removed testme, as this code hasn't changed since 2006 when this was filed.

No idea how this should be fixed. Seems evil to me.

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


Navigation
Links