Problem:
Wikibase handles some tasks around sitelink maintenance automatically like changing the sitelink when an article is moved or removing the sitelink when an article is deleted. This fails in some specific cases and leaves behind a sitelink pointing to a non-existing article. We should fix this and remove the sitelinks in these cases.
To reproduce:
- have an Item with a sitelink to an article on a client wiki
- move the article with the "suppress redirect" option to a namespace that is not supported for sitelinks (e.g. User: and Draft: for Wikidata)
- see sitelink not being changed/removed
Links to existing discussions/reports:
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/10#Identifying_interwiki_links_that_no_longer_exist
- T201371
- https://www.wikidata.org/wiki/Topic:Vsnby0dfotcfi23y
Acceptance criteria:
- The sitelink is removed from the Item if the article is moved to an unsupported namespace with the "suppress redirect" option
Notes:
- Setting for unsupported namespaces is $wgWBClientSettings['excludeNamespaces'] (for local testing, = [ NS_USER ] or = [ NS_PROJECT ] may be used)
Expected behavior for each case:
page is moved to a non-excluded namespace | page is moved to an excluded namespace | |
suppress redirect is checked | sitelink on the Item is updated to the new target | sitelink is removed from the Item |
suppress redirect is not checked | sitelink on the Item is updated to the new target | sitelink is untouched |