Wikidata talk:Sitelinks to redirects
Translate markup
editHi. We're planning on linking to this page from the entry in next week's Tech News. I'm wondering if this page is ready to be marked for translation?
I.e. Ideally when I send the "Tech News is ready for translation" emails to the translators-l@ list tomorrow, if they click through from the entry to here, they will immediately be able to help. And/or readers of the edition on Monday will be able to help (or learn how the system works, in their own language).
Pinging @MisterSynergy and @ChristianKl FYI (as editors of this page, and as Translation-Admins). Thanks! Quiddity (WMF) (talk) 22:29, 9 November 2022 (UTC)
- I made quite some modifications. It is in my opinion kinda okay now, but certainly with room for further improvement. Since we are probably getting some more feedback/questions by users of this page at a later point in time, I'd be fine with a translation at this point. —MisterSynergy (talk) 23:29, 9 November 2022 (UTC)
- I'm also fine with marking it for translation. I'm currently not sure how to mark a new page for translation. @MisterSynergy: do you know? ChristianKl ❪✉❫ 23:55, 9 November 2022 (UTC)
- Let's ask @Ameisenigel to set this up—they are by far the most prolific translation admin these days. I could technically do this by myself, but I'd rather not botch it with my rather limited experience in this field. —MisterSynergy (talk) 00:08, 10 November 2022 (UTC)
- The page is now ready for translation. --Ameisenigel (talk) 07:33, 10 November 2022 (UTC)
- Let's ask @Ameisenigel to set this up—they are by far the most prolific translation admin these days. I could technically do this by myself, but I'd rather not botch it with my rather limited experience in this field. —MisterSynergy (talk) 00:08, 10 November 2022 (UTC)
Tools?
edit@ChristianKl, MisterSynergy: Hello, is there a way to add redirecting sitelinks in a batch? I tried Wikibase-Cli and then Pywikibot in PAWS environment and both failed due to the reason that "the article name is already used elsewhere". In other words, the tools generally try to redirect the article first and then bump into an error, rather than adding the original redirect name. Any help appreciated! Vojtěch Dostál (talk) 21:00, 10 November 2022 (UTC)
- I haven't yet added it in batches. I'm not sure whether Wikibase-Cli / Pywikibot needs to be updated or whether the problem is at the Wikibase level. Please raise the issue at https://phabricator.wikimedia.org/T278962 ChristianKl ❪✉❫ 21:12, 10 November 2022 (UTC)
- Just tested pywikibot on test.wikidata.org: if you add a sitelink including a redirect badge, it does not resolve the redirect and adds it including the badge directly. See [1] here for the example. —MisterSynergy (talk) 21:27, 10 November 2022 (UTC)
- @ChristianKl @MisterSynergy Same for Wikibase-Cli, as I just discovered with the help of its maintainer. I had no idea there is something like a "redirecting badge" hardwired into Wikidata. Thanks. Vojtěch Dostál (talk) 07:52, 11 November 2022 (UTC)
- I would have guessed that the current page explains the need for the badge well. I added the sentence "Attempts to links to redirects without adding a badge automatically fail." to make that more clear. Wikidata behaves this way, because we want the act to link to redirect to be an explicit choice. That said "the article name is already used elsewhere" is not a useful error message. ChristianKl ❪✉❫ 12:01, 12 November 2022 (UTC)
- @ChristianKl I think the behavior is instead that without the badge, the redirect is followed. So if the redirect target weren't associated with a wikidata item, attempting to link the redirect would instead link the redirect target. --Pokechu22 (talk) 17:55, 12 November 2022 (UTC)
- Yes, Wikidata always used to behave that way. Given that adding the ability to link to sitelink was controversial enough that it took five years since the RFC, the current change didn't change existing behavior that wouldn't be necessary to be changed. ChristianKl ❪✉❫ 13:35, 25 November 2022 (UTC)
- @ChristianKl I think the behavior is instead that without the badge, the redirect is followed. So if the redirect target weren't associated with a wikidata item, attempting to link the redirect would instead link the redirect target. --Pokechu22 (talk) 17:55, 12 November 2022 (UTC)
- I would have guessed that the current page explains the need for the badge well. I added the sentence "Attempts to links to redirects without adding a badge automatically fail." to make that more clear. Wikidata behaves this way, because we want the act to link to redirect to be an explicit choice. That said "the article name is already used elsewhere" is not a useful error message. ChristianKl ❪✉❫ 12:01, 12 November 2022 (UTC)
- @ChristianKl @MisterSynergy Same for Wikibase-Cli, as I just discovered with the help of its maintainer. I had no idea there is something like a "redirecting badge" hardwired into Wikidata. Thanks. Vojtěch Dostál (talk) 07:52, 11 November 2022 (UTC)
- Just tested pywikibot on test.wikidata.org: if you add a sitelink including a redirect badge, it does not resolve the redirect and adds it including the badge directly. See [1] here for the example. —MisterSynergy (talk) 21:27, 10 November 2022 (UTC)
The redirects, which are not connected to an wikidata object
can also be found using PetScan with
Is there a way to connect resp. create objects for redirects with redirect-badge using QuickStatements/PetScan, for example like
- Also see
Give help
editIn the Wikipedia box (bottom left on a Wikidata item screen), when typing the title of a Wikipedia redirect, the interface does not react in any way: the publish link remains greyed out just as if I'd typed the title of a non-existent page or a page already linked to another item. There seems to be no clue that, to make progress, I need to click on the rosette to the right and select "intentional sitelink to redirect" from the dropdown. Could the user interface be more proactive? Certes (talk) 23:26, 14 November 2022 (UTC)
- The technical change that allows us now to create the sitelinks was essentially a minimum viable change. I agree that it would be great if the usability would improve as time goes on. ChristianKl ❪✉❫ 13:01, 25 November 2022 (UTC)
How can I start using this template in Dutch Wikipedia?
editDutch Wikipedia currently doesn't seem to be able to transclude Template:Wikidata redirect. What should be done to make this possible? Beireke1 (talk) 11:52, 18 November 2022 (UTC)
- @Beireke1: You can do that by temporarily removing the redirect.
- Remove the redirect on the targeted redirect page: edit '#REDIRECT' at the top of the page to 'REDIRECT' and provide the reason (e.g. Temporarily removed redirect to connect to the Wikidata item) on the edit summary.
- Add the page you just edited to the Wikidata item: add the Wikipedia entity as you would normally add to a Wikidata item, and at the same time select 'sitelink to redirect' or 'intentional sitelink to redirect' from the badge selector to the right of the link, and then publish it.
- Restore the targeted page's redirect: Once you are sure you have published, open the page you just edited, revert manually to the version just before you edited, and provide the summary (e.g. Restored redirect) on the edit summary.
- This is just an example. There may be a better way other than this. --TKsdik8900 (talk) 03:29, 19 November 2022 (UTC)
- No, temporarily removing the redirect is no longer necessary and should not be used anymore, no matter if the local version of Template:Soft redirect with Wikidata item (Q16956589) exists or not. —Tacsipacsi (talk) 15:45, 20 November 2022 (UTC)
- @Tacsipacsi Doubtful, at least I really can't mark it for Portuguese wikis, where their Abusefilters hold up me from upd badges for links. Liuxinyu970226 (talk) 04:58, 24 November 2022 (UTC)
- @Liuxinyu970226: Their abuse filters? Adding and modifying sitelinks happens exclusively on Wikidata, I’d be quite surprised if abuse filters of other wikis could have any impact on it. —Tacsipacsi (talk) 16:08, 24 November 2022 (UTC)
- @Tacsipacsi Doubtful, at least I really can't mark it for Portuguese wikis, where their Abusefilters hold up me from upd badges for links. Liuxinyu970226 (talk) 04:58, 24 November 2022 (UTC)
- @Beireke1, I don’t think TKsdik8900 addressed your question. You will need to create a localized version of the template on nlwiki. You could call it something like w:nl:Sjabloon:Wikidata-omleiding. ⁓ Pelagic ( messages ) 07:37, 19 November 2022 (UTC)
- Thanks @Pelagic. @Geertivp: are you familiar with setting up new templates, or do you know whether this has been discussed in the Dutch community? Beireke1 (talk) 14:48, 21 November 2022 (UTC)
- @Beireke1, you could post the question in "De Kroeg" Geertivp (talk) 12:46, 22 November 2022 (UTC)
- @Geertivp Done. See the discussion there. Beireke1 (talk) 13:00, 24 November 2022 (UTC)
Link to help pages in the error message
editI am currently working on improving the error message to make it more helpful. My idea was to link to the Wikidata guidelines that best explain what editors should do in complex sitelink cases. I believe that Help:Sitelinks#Guidelines for using sitelinks on other Wikimedia sites might be the best link to use, assuming that these guidelines (and Help:Handling sitelinks overlapping multiple items) will be updated at some point. I just wanted to let you know about this in advance. Cheers, Manuel (WMDE) (talk) 14:02, 25 November 2022 (UTC)
- There are two ways the current error can be thrown:
- 1) The user adds a link to a sitelink that's already used elsewhere.
- 2) The user adds a link to a redirect that points to a page that's already used elsewhere as a sitelink.
- I would expect that it's worthwhile to throw different errors in each of those cases and not throw the same error. The most user friendly solution would be in the second case, to ask the user whether they want to set an "intentional sitelink to redirect"-badge with a yes/no question. Otherwise, both explicitely talking about the need for the badge and to a page that explains the necessity of the badges which currently happens to be 'Wikidata:Sitelinks to redirects' seems to me like the best option. It's worthwhile to keep in mind here that the error will be both thrown to users using the normal gui and also to bots.
- Help:Handling sitelinks overlapping multiple items currently has a "This page is outdated" and I don't think it makes much sense at the status quo. 'Wikidata:Sitelinks to redirects' seems to me like a more useful help page. ChristianKl ❪✉❫ 15:14, 25 November 2022 (UTC)
Wikimedia disambiguation page (Q4167410) with only links to redirect
edit@MisterSynergy: Should we simply delete all instances of Wikimedia disambiguation page (Q4167410) that only have sitelinks to redirects but not to non-redirect pages in bulk?
For Wikimedia list article (Q13406463) the case is similar, but some Wikimedia list article (Q13406463) are linked from other Wikidata items. Should we delete all of those, only those that aren't linked from within Wikidata or none? ChristianKl ❪✉❫ 00:01, 27 November 2022 (UTC)
- Some deletions will certainly be possible, but I find it more difficult than initially anticipated. Technical items such as dab page items or list items are indeed easier than most other cases.
- This list is an overview of the P31 values (if existent) of items that have sitelinks with the sitelink to redirect (Q70893996) badge. Once all badges are added, we can go through the list and investigate further. —MisterSynergy (talk) 00:06, 27 November 2022 (UTC)
- Okay, can you write here when all the badges are added? ChristianKl ❪✉❫ 00:12, 27 November 2022 (UTC)
- Yes, I will keep you updated here. Probably 2 weeks or so from now. —MisterSynergy (talk) 00:22, 27 November 2022 (UTC)
- Okay, can you write here when all the badges are added? ChristianKl ❪✉❫ 00:12, 27 November 2022 (UTC)
Initial bot run complete
editToday my bot has finished the initial run to equip all existing sitelinks to redirects with the sitelink to redirect (Q70893996) badge. There are still a couple of minor situations to fix, but this does not change the overall picture any more. The bot will now run weekly (on Fridays as of now) and manage all new cases:
- add sitelink to redirect (Q70893996) where missing
- remove sitelink to redirect (Q70893996) when both badges are there
- remove sitelink to redirect (Q70893996) and intentional sitelink to redirect (Q70894304) if sitelink is to a non-redirect page
- remove sitelink completely if redirect has inexistent target
- report sitelinks to redirects with unconnected redirect targets to Wikidata:Database reports/Sitelink to redirect with unconnected target (coming soon)
As an overview, here is a query that counts the number of sitelinks to redirect pages (with either of the two badges) per project: https://w.wiki/65ZS. The total number for all projects is currently roughly at 552.000 sitelinks. —MisterSynergy (talk) 23:39, 7 December 2022 (UTC)
- @MisterSynergy Given that amount of sitelinks, it will be impossible to handle them all one-on-one. Fortunately, there seems to be classes like asteroid (Q3863) which contains thousands of sitelinks that all follow the same pattern of pointing to a list of asteroids and thus could be moved in bulk to be intentional sitelinks to redirects.
- Ideally, we have some system where users can make requests to convert sitelinks in bulk. It might make sense to create a new page "Bulk conversion of sitelinks of redirects to intentional sitelinks to redirects" which describes the necessary information to make a conversion request and then have the talk page of that page be the place for the bulk requests. What do you think about that procedure? ChristianKl ❪✉❫ 00:14, 8 December 2022 (UTC)
- Sure I understand.
But we need to evaluate this better. The "intentional" badge should not be used if redirect and redirect target basically describe the same concept; in that case, we would probably rather merge the two Wikidata items where the redirect and the redirect target are connected to. I have no idea how many of these cases exist; somehow P31 values of involved items need to be reasonably different in order to infer that the concepts are different.
I do not think that we need a new request board, though. The regular bot request board should be sufficient. Anyways, we should practice the workflow in a smaller team before making it available to the larger community. —MisterSynergy (talk) 00:28, 8 December 2022 (UTC)- I agree that if both describe the same topic they shouldn't be merged. Likely, in many cases where that might be true, individual attention to items is needed and they cannot be merged in bulk. ChristianKl ❪✉❫ 10:24, 8 December 2022 (UTC)
- I created the first entry: https://www.wikidata.org/wiki/Wikidata:Bot_requests#Request_to_make_sitelinks_of_asteroid_items_intentional_(2022-12-08) ChristianKl ❪✉❫ 10:33, 8 December 2022 (UTC)
- Sure I understand.
- Bravo @MisterSynergy: for this great bot work.
- Here's also a slightly tweaked query https://w.wiki/6DGt , that gives separate counts for the intentional redirects and the other redirects. Jheald (talk) 11:59, 11 January 2023 (UTC)
- Also a query https://w.wiki/6DK3 to break down that huge number of en-wiki redirects by class. Jheald (talk) 15:32, 11 January 2023 (UTC)
- Plus: 12397 items (count) that are subclasses, rather than atomic items. (breakdown).
- Also: 27256 (count) that have neither P31 nor P279 (list -- may not run first time / alternatively first 1000, including a column counting how many non-redirect articles for each item). Jheald (talk) 17:17, 11 January 2023 (UTC)
- @Jheald: it appears to me that your query https://w.wiki/6DGt from above is not 100% accurate, and https://w.wiki/6J6r should be used instead. There are sitelinks with badges in WDQS that are not linked to any Wikidata item, for whatever reason: https://w.wiki/6J6w. These sitelinks are actually not linked to Wikidata (I think it is just residual garbage in WDQS), so you do not want to count them. ---MisterSynergy (talk) 23:13, 3 February 2023 (UTC)
Stats on explanations of redirects ?
editIt might be interesting to see if we can write queries to look for relationships between items and their redirect-targets, to see what 'explanations' might be some of the most common for intentional redirects. For example if we look at a set of items with the set of items for their intentional redirect targets, how often do we find the original item and the redirect-target item can be connected via a single property? Or via a chain of two properties? And which properties?
This could help us better understand (a) what redirects are being used for; and (b) whether there are particular patterns of redirects that we can say with more confidence are likely to be reasonable and intentional.
Unfortunately I'm not confident enough with the MWAPI service in SPARQL to know whether it can be used to get back the redirect-target items for a set of original items efficiently at scale. (Pinging @MisterSynergy: for thoughts?) -- it might be something that would need to be done in some sort of batched way, controlled by a external program. But I do think this could be research that could be of quite some interest. Jheald (talk) 12:26, 11 January 2023 (UTC)
- I think I could at least help with the input. My bot manages these badges weekly and compiles a TSV file that includes (besides other things) the QID of the redirect item and the QID of the target item (if there is one). The file is currently ~119M in size and should be accessible on Toolforge; I could also move it elsewhere so you could download it.
- I have not yet looked into any existing or potential connections between redirect items and target items, though. —MisterSynergy (talk) 12:41, 11 January 2023 (UTC)
- Thanks. It's quite a long time since I last logged on to the tools platform, but I should be able to get hold of that if it and its directories are publicly accessible. But I might leave it for the time being, to try to get some more other stuff done first. Jheald (talk) 19:10, 11 January 2023 (UTC)
- For those who are interested, look for
/data/project/msynbot/pywikibot_tasks/redirect_sitelink_badges/output/cases.tsv
, it should have read access for all users as much as I am aware; there is one row in this file for each redirect sitelink (with or without badge), in total 559.122 as of now; columns are:- dbname (identifying the wiki where the sitelink is pointing to)
- redirect qid
- redirect page_id (on client wiki)
- redirect page_namespace (on client wiki)
- redirect page_title (on client wiki)
- target page_id (on client wiki)
- target page_namespace (on client wiki)
- target page_title (on client wiki)
- target link fragment (can be empty)
- target interwiki prefix (can be empty)
- target qid (if target is connected)
- s2r sitelink (sitelink URL if s2r badge is present)
- s2r name (page_title if s2r badge is present)
- s2r badge (Q70893996 if s2r badge is present)
- i2r sitelink (sitelink URL if i2r badge is present)
- i2r name (page_title if i2r badge is present)
- i2r badge (Q70894304 if i2r badge is present)
- Here, "s2r" refers to the sitelink to redirect (Q70893996) badge, and "i2r" to the intentional sitelink to redirect (Q70894304) badge. You are probably looking for the "redirect qid" and "target qid" columns. The file is being updated weekly. —MisterSynergy (talk) 19:39, 11 January 2023 (UTC)
- For those who are interested, look for
- Thanks. It's quite a long time since I last logged on to the tools platform, but I should be able to get hold of that if it and its directories are publicly accessible. But I might leave it for the time being, to try to get some more other stuff done first. Jheald (talk) 19:10, 11 January 2023 (UTC)
- There are some patterns like the individual asteroids where we have thousands of Wikidata items that have redirects that point to lists of asteroids. If you just look at the existing intentional sitelinks to redirects you wouldn't find the pattern unless someone writes a bot to give them the internationl badge. Half of the items on the worklist for English items are currently asteroids.
- Characters and places in Lord of the Rings are similar in that there seem to be hundreds that each have their own Wikidata item but are discussed together on Wikipedia articles. If someone would move over items like that where there are large lists, that would make it a lot easier to look manually at those items where actual human judgement is needed. ChristianKl ❪✉❫ 19:29, 16 January 2023 (UTC)
small worklist
editfor the following redirects, the connected wikidata object should be changed (first empty the page, then connect it to the right wikidata object, then recreate the redirect):
- en:Honorary doctorate to Q11415564
- en:Publisher to Q2516866
- en:Cathedral dean to Q1236978
- en:Forest science to Q19924411
- en:Senate of Hamburg to Q477155
- en:Bookbinder to Q1413170
- fr:Métissage to Q4422503
- es:Caolín to Q908663
- es:Dignidad humana and ar:الكرامة الإنسانية to Q11701015
Vergänglichkeit (talk) 02:45, 19 February 2023 (UTC)
- Emptying pages is not necessary anymore to add redirects. You just need to set the badge as described on this help page. ChristianKl ❪✉❫ 13:39, 9 September 2023 (UTC)
- Thanks! I didn't know. So now, I went through the list myself. Done.--Vergänglichkeit (talk) 13:59, 5 October 2024 (UTC)
Do you really need admin permissions for doing this?
editI’m trying to link the Wikipedia redirect Babe the blue ox to my newly-created item Babe the Blue Ox (Q122750748) using a sitelink to redirect badge.
Maybe I just have to wait for autoconfirmation …
Could not save due to an error.
- The save has failed.
- Warning: You are trying to add/remove badges to this item. At local Wikipedias adding or removing badges are done by consensus. Saving this edit was blocked and should be done only by administrators or trusted users. If you think you are correct, please contact an administrator.
— keepright! ler (talk) 15:08, 21 September 2023 (UTC)
- You definitely don't need to be an administrator. Based on Special:AbuseFilter/52 it looks like you just need to be autoconfirmed. Perhaps the filter should be relaxed here (it makes more sense for the "featured article" badge though) . I've added it for you in this case. --Pokechu22 (talk) 15:25, 21 September 2023 (UTC)
- Oh, thanks a lot! — keepright! ler (talk) 15:45, 22 September 2023 (UTC)
Similarly, I'm trying to add a sitelink from https://www.wikidata.org/wiki/Q1729107 to a redirect at wikipedia:Cardinal arithmetic, but it's failing for the same reason. How am I supposed to get 50 edits to become autoconfirmed, if I can't make the first edit, because I'm not autoconfirmed? ;-) — JohnMCarver (talk) 12:58, 20 February 2024 (UTC)
Trying to add sitelink to redirect to an anchor of a page with other existing link
editIve tried to add Wasserwärmepumpe as sitelink to wikidata:Q60963457 but this fails because of the sitelink from wikidata:Q10577628 to Wärmepumpenheizung.
Wasserwärmepumpe is a redirect to an anchor of Wärmepumpenheizung. As far as i understand the article this should have worked right?
See german discussion [2] for background info, why i want to do this. R Focke (talk) 19:36, 21 November 2023 (UTC)
- https://www.wikidata.org/w/index.php?title=Q60963457&diff=prev&oldid=2015442789
- You can only add a redirect sitelink if you add a redirect sitelinks badge at the same time. See Wikidata:Sitelinks to redirects for details. —MisterSynergy (talk) 19:54, 21 November 2023 (UTC)
Commonswiki
editCommonswiki has "category redirects" that are technically not redirects. I think it would make sense to treat those as redirects on Wikidata. bdijkstra (overleg) 12:47, 2 December 2023 (UTC)
- how many of those are connected to Wikidata? —MisterSynergy (talk) 13:38, 2 December 2023 (UTC)
- About 9000. bdijkstra (overleg) 14:31, 2 December 2023 (UTC)
- many of those seem to be connected to duplicate items, and the category redirects seem to be mere alternative spellings (translations) that should not be connected to Wikidata at all. not sure whether more badges would help to solve this problem. ---MisterSynergy (talk) 17:47, 2 December 2023 (UTC)
- It wouldn't hurt to make them more visible. And there are legitimate cases, like this one, though I have no idea how many more legitimate cases there are. bdijkstra (overleg) 18:32, 2 December 2023 (UTC)
- many of those seem to be connected to duplicate items, and the category redirects seem to be mere alternative spellings (translations) that should not be connected to Wikidata at all. not sure whether more badges would help to solve this problem. ---MisterSynergy (talk) 17:47, 2 December 2023 (UTC)
- About 9000. bdijkstra (overleg) 14:31, 2 December 2023 (UTC)