Module talk:Redirect

Weird behaviour

"{{#invoke:redirect|main|File:Test.svg}}" = ""

On en:wp, the origin of this module, this code produces " File:Test.svg ". here, it produces blank. RZuo (talk) 09:03, 28 April 2023 (UTC)

Not weird and documented: "Gets the target of a redirect. If the page specified is not a redirect, returns nil" (when called from normal Lua functions, i.e. the empty string from MediaWiki Scribunto invokations). This also allows testing if pages are redirect in order to suppress them (notably when several alternate page names are tested, to select the appropriate one that exist, in a prefered order). If the non-existant page name was still returned, we would will not know if the target exists and would link to it in all cases, producing red links... So this is needed to support aliases (which are very frequent in Commons, such as page names with or without disambiguation suffixes, or with alternate synonyms, or during unification of names to allow the transition by still supporting old page names as long as they exist, and are not redirected to another page). verdy_p (talk) 22:21, 8 January 2025 (UTC)

12 Sept 2025


Kindly sync with enwiki: en:Module:Redirect Waddie96 (talk) 05:00, 12 September 2025 (UTC)

The module at en wikipedia has 120 lines whereas this module has 320 lines, and 1'808'584 transclusions. I discourage "sync with enwiki" without very careful analysis. m:Special:CentralAuth/Waddie96 blocked one one wiki, template editor here, why do you request a trivial (but probably bad) edit than you can do yourself? Taylor 49 (talk) 21:36, 20 September 2025 (UTC)
Got you. Hi, hmm, I still need to challenge the block, it was something that was seemingly personal that was brought onwiki. Tbh I just haven't had the energy as I don't actually enjoy mediawiki. My contribution history on there and all other wikis attests to my behaviour anyway. And I only became a template editor on 13 September and the request was made 12 Sept Waddie96 (talk) 00:33, 21 September 2025 (UTC)