Steps towards making Institution draw directly from Wikidata

Some first steps towards getting an Institution template to draw directly from Wikidata can be seen at d:Template:Institution/statictest -- still with quite a lot of weirdness still to be fixed at the moment, some of which is identified at d:Template talk:Institution, plus some that probably isn't.

This has to be hosted on Wikidata at the moment, because it requires "access to arbitrary items" -- the ability for template code called from one page to access information about a Wikidata item sitelinked to a different page. (Also called Wikidata Phase 3).

Such arbitrary access won't generally be possible until some quite heavy technical work has been done first, to enable MediaWiki to be able to work out whether (and which) pages need to be regenerated if an item on Wikidata changes. So it's not expected to be generally available on wikis including Commons until some time in 2015. But it is now possible, for development work without page regeneration, on Wikidata itself.

So that is why the development pages above are on Wikidata, rather than here.

See also the main project page d:Wikidata:WikiProject Structured Data for Commons/Template workshop for more information on the development, plus the (slightly more advanced) corresponding pages for the Creator template at d:Template talk:Creator, d:Template talk:Creator/statictest, d:Template:Creator/statictest and d:Template:Creator/wrapper/test

The Institution page also, at d:Template:Institution/statictest#Template_wikitext_generation, attempts to show what's going on 'under the bonnet' and passed to the existing template, in a form that will be possible to cut-and-paste to make new Institution:xyz templates here. (Once some more of the bugs are sorted out).

All thoughts and comments gratefully received, Jheald (talk) 22:35, 19 September 2014 (UTC)

Thank you, the mockups are great! Unfortunately the missing arbitrary access prevents an enrollment on Commons at the moment of course. But perhaps the main functionality of the templates could yet be tested on Commons at single pages connected directly by Wikibase. --Marsupium (talk) 13:50, 20 September 2014 (UTC)
More test-cases now up at d:Template:Institution/wrapper/test. Still quite a lot to fix (see its talk page), and a lot to do to check things for proper robustness; but it's good to get some more examples on the board. Feel free to try others, if you think there may be any particularly awkward cases to handle.
As for connecting Institution pages directly to Wikidata -- in general, let's not do this. Unfortunately, for better or worse, the way Wikidata is constructed at the moment, each WD item can only link to a single target, and it's important that those links are consistent, predictable and traversable ie Category <-> Category-like item, Gallery <-> Article-like item. Otherwise too many things get too vulnerable.
There are queries at d:Wikidata:WikiProject Structured Data for Commons/Phase 1 progress/Links/Institution to check whether any items link directly to Institution pages, which can be re-run by following the links, logging in to the Quarry app, possibly re-loading the link, and then hitting "submit query". At the moment, thanks to the efforts of User:EugeneZelenko, the number is zero and it really ought to remain that way.
Conceivably in future there may be very special instances when cases need to be tested on Commons, as the Commons:Structured data project gets more thoroughly under way; but for the present it's not such a big hardship to have to be using Wikidata-wiki for the development and testing environment. Jheald (talk) 14:36, 20 September 2014 (UTC)
Return to "Institution/2014" page.