2

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".

waanders
  • 8,907
  • 22
  • 70
  • 102

1 Answers1

3

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.

  • 2
    Any MediaWiki message can be edited on-wiki, at the `MediaWiki:` page. Please don't edit language files directly, you'll run into trouble when updating. (The reason Wikipedia uses an additional template is probably that you don't need an administrator account to edit it that way.) – Tgr Apr 19 '15 at 18:58
  • @Tgr: I hadn't realized that, that should be a lot more straightforward indeed - thank you! I edited my post to have the better answer on top but if you want to submit it as an answer yourself I'll upvote. – Jarek Piórkowski Apr 19 '15 at 19:54
  • Additionally, other similar pages can be found by searching or browsing the list at `Special:AllMessages`. _(Note: For ~very~ old MediaWiki installations that have since been upgraded, you may notice a message stating that `MediaWiki:Noarticletext` has been deleted automatically by the nonexistent user ‘**MediaWiki default**’. This occurred automatically when the upgrade scripts were run for that particular installation, likely sometime between 2005 and late 2011. Re-create the page as necessary with your desired custom text.)_ – Jim Grisham Sep 01 '22 at 21:50
  • The _current_ and default settings for these pages can be viewed for any MediaWiki installation, such as the [English-language version of Wikipedia](https://en.wikipedia.org/wiki/Special:AllMessages?prefix=Noarticletext), [Wikipedia Meta](https://meta.wikipedia.org/wiki/Special:AllMessages?prefix=Noarticletext), and the [MediaWiki site itself](https://mediawiki.org/wiki/Special:AllMessages?prefix=Noarticletext) _(or for any arbitrary installation at `Special:AllMessages?prefix=Noarticletext`)_. – Jim Grisham Sep 01 '22 at 22:15