Questions are coming in weekly about external identifiers, people who are trying to replicate the behaviour of Wikidata.org. Maybe better documentation is needed.
Description
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | • johl | T159215 Wikidata documentation sprint | |||
Resolved | Seb35 | T130942 [Task] Document the use of formatterUrlProperty |
Event Timeline
Comment Actions
Most are wondering why the identifiers are not linked on their own Wikibase installation and don't know that they need to declare the formatterUrlProperty. Pinging @hoo who answered this question before.
Comment Actions
I just succeeded in using formatterUrlProperty on a test wiki. Here is my steps:
- After installation of Wikibase repo, create a property with type String, it can be empty (without any statement), this will be the equivalent property than http://www.wikidata.org/entity/P1630, it is numbered P5 in my case;
- In LocalSettings.php, set $wgWBRepoSettings['formatterUrlProperty'] = 'P5';;
- Run the maintenance script php extensions/Wikibase/repo/maintenance/rebuildPropertyInfo.php --rebuild-all --force;
- Then your properties can declare some P5 with as the value the URL of the destination, with $1 in the URL as a placeholder with the external identifier.
I searched for some time the third step above, I’m not sure if it’s mandatory or if it was because I created the properties (of step 4) before setting formatterUrlProperty.
Comment Actions
I’ve just written Wikibase/Installation/Advanced configuration#Define links for external identifiers, I guess it is enough to close this task.