Module talk:Author/data
Latest comment: 1 year ago by Billinghurst
@Xover: Any way we can check/identify if the Q-codes to see whether they have been converted to redirects? One of the occupation codes was converted and it seems that our setup was unable to identify such. The occupation stopped showing. — billinghurst sDrewth 02:05, 26 February 2023 (UTC)
- @Billinghurst: There doesn't seem to be any documented way to detect a redirect for a WD entity. But if something broke here then it ipso facto must be visible somehow (not necessarily in a way we can make use of, of course). What broke, what are the relevant pages, and how was it fixed (if it was fixed)?If we can't detect it in Lua, and we can't make our modules just transparently handle redirects, then the alternative is a bot that periodically checks for these and reports it somewhere. Xover (talk) 08:30, 26 February 2023 (UTC)
- user:xover => special:diff/13025242, basically it wasn't showing as a category, so I went to add it, though checking what we did have first. — billinghurst sDrewth 08:49, 26 February 2023 (UTC)
- @Billinghurst: Ah, I see what's happening. We're fetching everything that's actually registered on James Ralfe (Q18671632), and in its occupation (P106) field the value is naval historian (Q67202187). The previous naval historian (Q86603057) in itself works just fine through the redirect, but we never see it because the item holds the target value. Thus, when we go to look up categories in Module:Author/data we don't get a match. Nothing is actually failing, technically speaking, so there's nothing we can trigger off.The only workable way I can think of would be a bot that periodically checks all the QIDs listed in Module:Author/data and writes a list on-wiki when one or more of them are redirects.Long term, an alternative approach could be to maintain the actual categories on Wikidata. If naval historian (Q67202187) had a property for "Category name on English Wikisource" we could stop maintaining a local mapping and just use the data from WD directly. Sitelinks won't work since they're usually used for non-category links, and I don't think WD has a concept of multi-project links (i.e. so multiple language Wikisources could be supported), so it'd be kinda awkward currently. But it might be worth exploring to reduce our maintenance burden here. Xover (talk) 10:04, 26 February 2023 (UTC)
- Xover:There should be the two way interrelationships of data at WD between the occupation and the correspond naval historian (Q67202187) => topic's main category (P910) / Category:Naval historians (Q8359408) => enWS:Category:Naval historians. Though that is not going to be effective as Murchison Medal (Q1634098) => category for recipients of this award (P2517) / Category:Murchison Medal winners (Q7865059) => enWS: Category:Recipients of the Murchison Medal, though they are possibly soe sort of consistent per addCategoriesFromClaims, thought that would need to thoroughly checked per addCategoriesFromClaims. Is that something that wee should be exploring, though it does lead to longer chains to break, versus having clear eyes on things that could break. — billinghurst sDrewth 11:23, 26 February 2023 (UTC)
- @Billinghurst: Ah, I see what's happening. We're fetching everything that's actually registered on James Ralfe (Q18671632), and in its occupation (P106) field the value is naval historian (Q67202187). The previous naval historian (Q86603057) in itself works just fine through the redirect, but we never see it because the item holds the target value. Thus, when we go to look up categories in Module:Author/data we don't get a match. Nothing is actually failing, technically speaking, so there's nothing we can trigger off.The only workable way I can think of would be a bot that periodically checks all the QIDs listed in Module:Author/data and writes a list on-wiki when one or more of them are redirects.Long term, an alternative approach could be to maintain the actual categories on Wikidata. If naval historian (Q67202187) had a property for "Category name on English Wikisource" we could stop maintaining a local mapping and just use the data from WD directly. Sitelinks won't work since they're usually used for non-category links, and I don't think WD has a concept of multi-project links (i.e. so multiple language Wikisources could be supported), so it'd be kinda awkward currently. But it might be worth exploring to reduce our maintenance burden here. Xover (talk) 10:04, 26 February 2023 (UTC)
- user:xover => special:diff/13025242, basically it wasn't showing as a category, so I went to add it, though checking what we did have first. — billinghurst sDrewth 08:49, 26 February 2023 (UTC)