Module talk:Wd
Edit request
[edit]{{Edit request}}
Hi. Please update to the latest version on English Wikipedia (currently w:en:Special:PermaLink/938654442). In this update, a new parameter, called |page=
, has been added to the module. This allows users to get information from Wikidata by page's name, not Wikidata item ID. In my humble opinion, this will be of great use. Thank you. Ahmadtalk 18:32, 1 February 2020 (UTC)
Syncing with enwiki
[edit]This is a continuation of the discussion at Module talk:WikidataIB#Return the QID. TL;DR: The bug phab:T246809 makes this module mostly unusable for querying Commons:Structured data (SDC) so I made this edit to the sandbox, which brings partial SDC support that allows this module to power {{DPLA metadata}}. The edit could also be made on enwiki, but it will not produce a visible difference there.
We should use this opportunity to sync this module with enwiki. A diff of the proposed changes to this module can be found here. The changes include a gsub pattern fix but predominantly they try to improve the display of references. I looked at how this modules is used on Commons and created /testcases for that. The sandbox module passes all of them, which is not too surprising since the reference features are unused on Commons.
@Mike Peel: So I think it's safe to copy Module:Wd/sandbox and ist subpage to Module:Wd. --LennardHofmann (talk) 09:29, 14 August 2023 (UTC)
- @Mike Peel: Just notifying here again in case you could take a look! Dominic (talk) 17:42, 2 October 2023 (UTC)
- @LennardHofmann and Dominic: Sorry for the delay with this, and Lennard for the reminder today. I made it live, but it threw errors: 'Lua error in Module:Wd at line 20: attempt to call field 'init' (a nil value).' This was at Category:Babisnauer Straße, Dresden for example, due to {{Dresden street}}. A bunch of railway categories were also affected, e.g., and Category:Cheseaux railway station, but I didn't catch the error message from those. Thanks. Mike Peel (talk) 19:22, 16 April 2024 (UTC)
- @Mike Peel:
I made it live, but it threw errors: 'Lua error in Module:Wd at line 20: attempt to call field 'init' (a nil value).'
- I guess Module:Wd/i18n should also have been updated.
I didn't catch the error message from those.
- You can edit the old revision and use Preview page with this template to get the error message even after the revert as long as you know what the broken page was. (Same error message as above, by the way.) —Tacsipacsi (talk) 22:32, 16 April 2024 (UTC)
- Ah, OK, also syncing i18n fixed it. New version now live. Thanks. Mike Peel (talk) 20:20, 17 April 2024 (UTC)
- @LennardHofmann and Dominic: Sorry for the delay with this, and Lennard for the reminder today. I made it live, but it threw errors: 'Lua error in Module:Wd at line 20: attempt to call field 'init' (a nil value).' This was at Category:Babisnauer Straße, Dresden for example, due to {{Dresden street}}. A bunch of railway categories were also affected, e.g., and Category:Cheseaux railway station, but I didn't catch the error message from those. Thanks. Mike Peel (talk) 19:22, 16 April 2024 (UTC)
- @LennardHofmann: Won't this cause a major synchronization issue down the road every time this module is updated at its source on enwiki? I do not understand why this module needs to support MediaInfo serialization to begin with. If people want/need such it would be better to write a different module with such support. This module is named "Wd" (for Wikidata) and not "SDC" or "Wb" (for "Wikibase" generalizing both). It seems to me this is strictly a Commons issue so why not have Commons develop their own solutions not try to hack Wikidata solutions. Now if you want to base your SDC supporting module off this one I do not mind but I recommend against trying to support that here in a strictly Wikidata supporting module. Do not try to make it something it isn't as that will only lead to many headaches down the road. Besides, if you want to support MediaInfo, shouldn't you be using its own API (documented at mw:Extension:WikibaseMediaInfo/Lua)? —Uzume (talk) 11:36, 17 April 2024 (UTC)
- This should also be synced back to enwiki to avoid the synchronization problems. Extending it to cover the general case makes sense, rather than duplicating code. Thanks. Mike Peel (talk) 20:20, 17 April 2024 (UTC)
- Yes, this should be synced back. There's almost no MediaInfo specific code in this module, it just happens to work (with my small bug fix added, which is currently the only change made on Commons). LennardHofmann (talk) 09:28, 18 April 2024 (UTC)
- @LennardHofmann: But that is not really a bug as it works just fine for Wikidata items and properties. Extending it to work with MediaInfo entities is feature creep. The quoted bug fix is hardly the only change in how such entities need to be handled. There is also "claims" vs. "statements" and the lack of "datatype", etc. —Uzume (talk) 09:51, 21 April 2024 (UTC)
- Yes, this should be synced back. There's almost no MediaInfo specific code in this module, it just happens to work (with my small bug fix added, which is currently the only change made on Commons). LennardHofmann (talk) 09:28, 18 April 2024 (UTC)
- This should also be synced back to enwiki to avoid the synchronization problems. Extending it to cover the general case makes sense, rather than duplicating code. Thanks. Mike Peel (talk) 20:20, 17 April 2024 (UTC)