Difference between revisions of "Error messages"
(Created page with "The wiki contains a number of system error messages. These messages can be customized to your needs. For example, if a wiki has a lot of visitors with anonymous read-access...") (Tag: 2017 source edit) |
m (Text replacement - "[[en:{{PAGENAME}}]]" to "[[en:{{FULLPAGENAME}}]]") |
The wiki contains a number of system error messages. These messages can be customized to your needs.
For example, if a wiki has a lot of visitors with anonymous read-access only, these visitors get a permissions error when they try to access a page that does not exist:
This creates the impression that a page with that name exists, but the visitor does not have sufficient rights to view the page. In reality, the page simply does not exist and a user with write-permissions could now log in and create the page.
Therefore, we want to distinguish between anonymous visitors and users with write-access and show a tailored error message.
Creating a custom 404 error page[edit | edit source]
If a page does not exist yet, you can display a custom message.
To create the message:
- Create the page MediaWiki:Noarticletext-nopermission
- Add your custom message in edit mode.
- Save the page.
- To test the message, try to access a page that does not exist.Make sure you are not logged in, because this message is displayed to anonymous users only.
How to update the an error message[edit | edit source]
The text for the error pages on the wiki is stored in the form of system notifications. You can access these error messages from the page Special:AllMessages
.
To find the message or the messages that are being used on a particular error page, add ?uselang=qqx
or, if the url already contains a question mark, &uselang=qqx
to the page url:
This will expose the actual sources for the error messages on the page:
In the above example, there are two error messages on the page:
- permissionserrortext-withaction: displays the text "You do not have permission to edit this page, for the following reason"
- badaccess-groups: displays the text "The action you have requested is limited to users in one of the groups: Administrators, Editors, Reviewers.
Since the first message permissionserrortext-withaction is somewhat redundant, we will leave this part "blank" and create a custom text message for badaccess-groups.
These pages do not actually exist, and therefore the standard text message from the database is displayed. If you want to change a message, you must first create the page.
To update the error message for the example abovea system message:
-
Go to the special page "System messages" (
Special:AllMessages
) -
Enter the full name of the system message in the "Prefix" field of the filter:
The link to the system message apears in red.
- Click on the name to create a page for this system message and provide
-
Enter your custom error message . In our case, we add a comment to the page permissionserrorstext-withaction that states we want a page blank and save the page:
In the prefix filter box (see step 2), we now enter the name of the second system message, badaccess-groups. We add our custom error message on this page:
The error message does not have to be plain text, it can also contain formatting tags and images or other special content.To test the page, simply try to access a page that does not exist on the wiki. Make sure you are not logged in, since only anonymous users will get this particular error.The system message has now been customized.
- Continue to update any other system messages on the page.
Note: Many of these messages use parameters (e.g., "$ 1$1"), which should be considered when you change the default text. If something went wrong, you can also delete the custom error pages you created - then the default text from the database will be used again.
Related info
The wiki contains a number of system error messages. These messages can be customized to your needs. For example, if a wiki has a lot of visitors with anonymous read-access only, these visitors get a permissions error when they try to access a page that does not exist: [[File:permissionerror-default.png|650x650px]] This creates the impression that a page with that name exists, but the visitor does not have sufficient rights to view the page. In reality, the page simply does not exist and a user with write-permissions could now log in and create the page. Therefore, we want to distinguish between anonymous visitors and users with write-access and show a tailored error message. ==How to update theCreating a custom 404 error page== If a page does not exist yet, you can display a custom message. '''To create the message:''' #Create the page ''MediaWiki:Noarticletext-nopermission'' #Add your custom message in edit mode. #Save the page. #To test the message, try to access a page that does not exist.Make sure you are not logged in, because this message is displayed to anonymous users only. <br /> ==How to update an error message== The text for the error pages on the wiki is stored in the form of system notifications. You can access these error messages from the page <code>Special:AllMessages</code>. To find the message or the messages that are being used on a particular error page, add <code>?uselang=qqx</code> or, if the url already contains a question mark, <code>&uselang=qqx</code> to the page url: [[File:permissionerror-url.png|500x500px]] This will expose the actual sources for the error messages on the page: [[File:permissionerror-sourceinfo.png|600x600px]] In the above example, there are two error messages on the page: *''permissionserrortext-withaction:'' displays the text "You do not have permission to edit this page, for the following reason" *''badaccess-groups:'' displays the text "The action you have requested is limited to users in one of the groups: Administrators, Editors, Reviewers. Since the first message ''permissionserrortext-withaction'' is somewhat redundant, we will leave this part "blank" and create a custom text message for ''badaccess-groups.'' These pages do not actually exist, and therefore the standard text message from the database is displayed. If you want to change a message, you must first create the page. '''To update the errora system message for the example above:''' #Go to the special page "System messages" (<code>Special:AllMessages</code> ) #Enter the full name of the system message in the "Prefix" field of the filter: [[File:permissionerror-find.png|680x680px]] The link to the system message apears in red. #Click on the name to create a page for this system message and provide #Enter your custom error message. In our case, we add a comment to the page ''permissionserrorstext-withaction'' that states we want a page blank and save the page: [[File:permissionerror-blankpage.png|650x650px]] #In the prefix filter box (see step 2), we now enter the name of the second system message, ''badaccess-groups''. We add our custom error message on this page: [[File:permissionerror-custom.png|650x650px]] The error message does not have to be plain text, it can also contain formatting tags and images or other special content. #To test the page, simply try to access a page that does not exist on the wiki. Make sure you are not logged in, since only anonymous users will get this particular error. . The system message has now been customized. #Continue to update any other system messages on the page. {{Box Note|boxtype=note|Note text=Many of these messages use parameters (e.g., "$ 1$1"), which should be considered when you change the default text. If something went wrong, you can also delete the custom error pages you created - then the default text from the database will be used again.}} [[en:{{PAGENAME}}]][[de:Fehlermeldungen]]{{Box Links-en|Topic1=https://www.mediawiki.org/wiki/Manual:Interface/Noarticletext |mediawiki.org/wiki/Manual:Interface/Noarticletext}} [[en:{{FULLPAGENAME}}]] [[De:Fehlermeldungen]] [[Category:Customization]]
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | |||
The wiki contains a number of system error messages. These messages can be customized to your needs. | The wiki contains a number of system error messages. These messages can be customized to your needs. | ||
Line 9: | Line 10: | ||
Therefore, we want to distinguish between anonymous visitors and users with write-access and show a tailored error message. | Therefore, we want to distinguish between anonymous visitors and users with write-access and show a tailored error message. | ||
− | ==How to update | + | ==Creating a custom 404 error page== |
+ | If a page does not exist yet, you can display a custom message. | ||
+ | |||
+ | '''To create the message:''' | ||
+ | |||
+ | #Create the page ''MediaWiki:Noarticletext-nopermission'' | ||
+ | #Add your custom message in edit mode. | ||
+ | #Save the page. | ||
+ | #To test the message, try to access a page that does not exist.Make sure you are not logged in, because this message is displayed to anonymous users only. | ||
+ | |||
+ | <br /> | ||
+ | ==How to update an error message== | ||
The text for the error pages on the wiki is stored in the form of system notifications. You can access these error messages from the page <code>Special:AllMessages</code>. | The text for the error pages on the wiki is stored in the form of system notifications. You can access these error messages from the page <code>Special:AllMessages</code>. | ||
Line 24: | Line 36: | ||
*''permissionserrortext-withaction:'' displays the text "You do not have permission to edit this page, for the following reason" | *''permissionserrortext-withaction:'' displays the text "You do not have permission to edit this page, for the following reason" | ||
*''badaccess-groups:'' displays the text "The action you have requested is limited to users in one of the groups: Administrators, Editors, Reviewers. | *''badaccess-groups:'' displays the text "The action you have requested is limited to users in one of the groups: Administrators, Editors, Reviewers. | ||
− | |||
− | |||
These pages do not actually exist, and therefore the standard text message from the database is displayed. If you want to change a message, you must first create the page. | These pages do not actually exist, and therefore the standard text message from the database is displayed. If you want to change a message, you must first create the page. | ||
− | '''To update | + | '''To update a system message:''' |
#Go to the special page "System messages" (<code>Special:AllMessages</code> ) | #Go to the special page "System messages" (<code>Special:AllMessages</code> ) | ||
#Enter the full name of the system message in the "Prefix" field of the filter: [[File:permissionerror-find.png|680x680px]] The link to the system message apears in red. | #Enter the full name of the system message in the "Prefix" field of the filter: [[File:permissionerror-find.png|680x680px]] The link to the system message apears in red. | ||
− | #Click on the name to create a page for this system message | + | #Click on the name to create a page for this system message |
− | + | #Enter your custom error message and save the page. The system message has now been customized. | |
− | # | + | #Continue to update any other system messages on the page. |
− | {{Box Note|boxtype=note|Note text=Many of these messages use parameters (e.g., "$ 1"), which should be considered when you change the default text. If something went wrong, you can also delete the custom error pages you created - then the default text from the database will be used again.}} | + | {{Box Note|boxtype=note|Note text=Many of these messages use parameters (e.g., "$1"), which should be considered when you change the default text. If something went wrong, you can also delete the custom error pages you created - then the default text from the database will be used again.}} |
− | + | {{Box Links-en|Topic1=https://www.mediawiki.org/wiki/Manual:Interface/Noarticletext |mediawiki.org/wiki/Manual:Interface/Noarticletext}} | |
− | + | [[en:{{FULLPAGENAME}}]] | |
− | [[en:{{ | + | [[De:Fehlermeldungen]] |
+ | [[Category:Customization]] |