Is it possible that the extension only works for logged users? Or am I doing something wrong.
If I'm not logged I receive the message: 'This page redirects to an external site: '
If I'm logged it works fine.
Is it possible that the extension only works for logged users? Or am I doing something wrong.
If I'm not logged I receive the message: 'This page redirects to an external site: '
If I'm logged it works fine.
Solved: this happens if you do not create a new namespace instead using the main (0) namespace.
If I use this to make an external redirect, all trys to re-edit the page fail. Even if I type .../index.php?title=page&action=edit into the browser's adressbar, I'm instantly redirected to the page.
Any solutions for it?
I came here wondering the same. But the extension seems unmaintained, right? Are you still using it?
The "index.php?title=Page&action=edit" URL should work (I have tested it on MediaWiki 1.37.1 with no other extensions or customizations). This is the preferred method. The easiest way is to open another page in the editor and then change page name in the URL.
Another approach would be temporary disabling ExternalRedirect (altogether or for the specific namespace/page) in LocalSettings.php
.
This extension isn't working on 1.35.1, probably since the 1.35 release.
As described in this thread, this is caused by a deprecated method in the extension.
Therefore, you simply have to go to ExternalRedirect/ExternalRedirect.php and edit line 55.
function wfExternalRedirectRender($parser, $url = '') {
global $wgExternalRedirectNsIDs, $wgExternalRedirectPages, $wgExternalRedirectDeniedShowURL;
// $parser->disableCache();
$parser->getOutput()->updateCacheExpiry(0); //fix for wiki 1.35
if(!wfParseUrl($url) || strpos($url, chr(13))!==false || strpos($url, chr(10))!==false) {
return wfMessage('externalredirect-invalidurl')->text();
}
if(in_array($parser->getTitle()->getNamespace(), $wgExternalRedirectNsIDs, true)
|| in_array($parser->getTitle()->getPrefixedText(), $wgExternalRedirectPages, true)) {
header('Location: '.$url);
return wfMessage('externalredirect-text', $url)->text();
} else {
return wfMessage('externalredirect-denied')->text().($wgExternalRedirectDeniedShowURL
? ' '.wfMessage('externalredirect-denied-url', $url)->text() : "");
}
}
Hope that helps!
Cheers
ExternalRedirect v1.2.0, released on January 3 2022, supports MediaWiki 1.35+
Just in case anyone is wondering, this extension still works perfectly as of 2020-06-12.