Jump to: navigation, search

Err/doc



Usage

Use this template when you need to show a serious (fatal) error resulting from improper user input. Usually, it is best to simply show the error message from the appropriate parser function (in which case this template is not needed), but there are times when custom error messages are useful. Please do not use this on article pages directly, as it is likely quite useless and probably in violation of content policies.

<code>{{err|error message}}</code>

produces:

error message

This should be more specific than the default, and if possible, should give instructions for a "quick fix". There are no real rules for error messages, but, by analogy with the errors arising from parser functions, it appears that capitalization of the first letter is preferred.

Operation

Most wikitext works as expected, with a few caveats:

  1. Use {{!}} to encode the | character
  2. A table cannot be placed in the message.
  3. Images work, but only their captions are formatted (how one is supposed to big/bold/red an image is questionable anyway)
  4. If an = appear anywhere in the error message, prefix the message with 1=
  5. Links work as normal, but they won't turn red (usually)
  6. ''' ''' can be used to "cancel" bolding for a single word; note that at the moment such behavior breaks nesting; in other words, this is subject to change at any time as MediaWiki's parser engine is updated and the template itself repaired etc.

See also

  • Cite4Wiki, a Firefox add-on that uses this template (from ver. 1.4 onward)