Extension talk:Page Forms/MediaWiki red links code change

Newer versions of MW
Is this core hack still necessary in newer versions of MediaWiki? If so, can we insert a hook into the codebase from which an extension could do the job instead? --Jimbojw (talk | blog) 15:48, 1 August 2008 (UTC)


 * Now that I think about it, I think the same could be achieved by a function hooking into ArticleFromTitle. It would go something like this:
 * Check to see that "action=edit" and "redlink=1", if not return true
 * Run $title through sffAddDataLink (or something similar to find whether there's a default form), if not, return true
 * Create an instance of SFAddData with the form and target members preloaded (would have to code in support for preloaded vars rather than ripping from URL) and use it to overwrite $article, return false


 * Alternatively, the ArticleFromTitle hook could instead issue an HTTP 301 or 302 redirect to Special:AddData, using the output from sffAddDataLink. This would require no change to SemantiForms at all except for the addition of the new hook.  In either case, it should be possible to solve the redlink-directly-to-form problem in all supported versions of MediaWiki without any core hacking at all :) --Jimbojw (talk | blog) 16:14, 1 August 2008 (UTC)