Search code examples
mediawikimediawiki-apimediawiki-extensions

Change page shown for non existing MediaWiki page


I want to change the content of the page that is shown if a wikipage doesn't exists. See for example:

For now my wiki only shows "There is currently no text in this page. You can search for this page title in other pages, search the related logs, or edit this page".


Solution

  • Update: as @Tgr pointed out in comment below, it is easier and safer to edit MediaWiki:noarticletext page within MediaWiki software itself.


    If you have filesystem access where your wiki is hosted, you can edit the noarticletext key in [your wiki location in filesystem]/languages/i18n/en.json (or your currently active language).

    To make life easier you could have noarticletext message include a {{No article text}} template (as Wikipedia looks to have done) so that the message can later be edited from within MediaWiki by editing that template.

    Googling uncovers a Special404 MediaWiki extension but it looks like that needs filesystem access as well, at least to first install it.