Extension talk:ExternalRedirect

About this board

Page with external redirect is no longer editable

3
Trystan Damranya (talkcontribs)

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?

أحمد (talkcontribs)

I came here wondering the same. But the extension seems unmaintained, right? Are you still using it?

DavisNT (talkcontribs)

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.

Reply to "Page with external redirect is no longer editable"
84.50.133.41 (talkcontribs)

This extension isn't working on 1.35.1, probably since the 1.35 release.

Schlagmichdoch (talkcontribs)

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

DavisNT (talkcontribs)

ExternalRedirect v1.2.0, released on January 3 2022, supports MediaWiki 1.35+

Reply to "Not working as of 1.35.1"
NottNott (talkcontribs)

Just in case anyone is wondering, this extension still works perfectly as of 2020-06-12.

Reply to "Extension still works"
There are no older topics