Problem:
The error message when the user tries to add a redirect without a badge, does not mention the cause of the error.
Steps to reproduce:
- Edit Q9833 and add sitelink to redirect "enwiki:James Hamilton, Duke of Châtellerault"
- Publish
Result:
- error message A is shown
Error Message A:
Could not save due to an error. 1. The save has failed. 2. The link "enwiki:James Hamilton, Duke of Châtellerault" is already used by Item Q9833. You may remove it from Q9833 if it does not belong there or merge the Items if they are about the exact same topic.
Solution:
Show error message B instead in this case, to make the error message more actionable.
Error Message B:
Could not save due to an error. 1. The save has failed. 2. The link "enwiki:James Hamilton, Duke of Châtellerault" is already used by Item Q9833. You may remove it from Q9833 if it does not belong there or merge the Items if they are about the exact same topic. If the situation is more complex, please see: [https://www.wikidata.org/wiki/Help:Sitelinks#Linking_to_Wikimedia_site_pages Help:Sitelinks]
BDD:
If a redirect is not allowed as a sitelinks because of a missing redirect badge, then the error message is amended:
GIVEN an Item
AND a page on the client that is a redirect
AND the redirect target is already used in another Item
WHEN adding the page as a sitelink to the Item
AND not adding a redirect badge in the same edit
THEN the edit is rejected
AND the user is pointed to helpful information on how to resolve the problem (see error message B)
Acceptance criteria:
- If a redirect is not allowed as a sitelinks because of a missing redirect badge, then error message B is shown (see BDD).
- If there is no "intentional sitelink to redirect" badge (Q70894304) configured, still use the original error message A.
Links:
- Current guidelines
- New guidelines:
Original: