Skip to content

v1.5.0

Choose a tag to compare

@nishad nishad released this 02 Sep 13:09
· 2 commits to master since this release
8d1ade2

Requires Omeka S 4.0 or later. If you are on Omeka S 3, stay on v1.4.2.

If you are on Omeka S 4 and no suggestions ever appear, this release is the fix. Every release up to and including 1.4.2 advertises Omeka S 4 support but cannot run on it: they call two Laminas components that Omeka S 4 no longer ships.

Install by uncompressing Wikidata.zip into your modules directory. The folder must be named exactly Wikidata, with a capital W.

Fixed

  • No suggestions at all on Omeka S 4 (#10). Four separate causes: the missing Laminas components above; a failed lookup being cached as "no results" for an hour; network errors surfacing as HTTP 500 after a 10-second hang; and PHP warnings being printed into the JSON response when APPLICATION_ENV=development. An error from the Wikidata API is now reported instead of being silently cached as an empty result.
  • The input field looked wrong (#11). The value form still used Omeka S 3's language markup, so on Omeka S 4 the language box was permanently visible and the globe icon overlapped it. The form now uses Omeka S 4's own markup.
  • Language selection did nothing (#6). The module's language toggle and Omeka's own cancelled each other out, and standard language tags such as pt-BR, zh-Hant and en-GB returned no suggestions at all because only the underscore form was handled. Removing a language now works, and a language set through the API or an import is no longer discarded.
  • Saved values silently lost their data type. The data types reported their own name capitalised while being registered in lowercase, so Omeka could never resolve a saved value back to its Wikidata type: it degraded to a plain uri or literal, and the suggest widget disappeared when the item was edited again. Existing values are repaired automatically when you upgrade.
  • "Languages" never returned a language. It matched against Q315, the human faculty of language, rather than Q34770, a particular language — "french" returned condom and "german" returned nothing. It now returns French, German, Japanese and so on.
  • All data types now record the same canonical http://www.wikidata.org/entity/… URI. The reconciliation types previously used https://, so one entity could be stored under two different addresses.

Added

  • Wikidata data types can now be used as targets in batch edit's Convert data type, so a property that already holds Wikidata links as plain URI or text values can be converted in bulk. Only values containing a recognisable Wikidata link are converted; everything else is left untouched.

Changed

  • Omeka S 3 is no longer supported. Omeka S 4 rebuilt the part of the item form this module plugs into, and carrying both was what kept the language selector broken. Omeka S 3 now reports a clear version error rather than installing into a half-working state.
  • Requests now identify the module to Wikidata. The previous generic user agent shared a rate limit with every other unidentified client, which is one reason suggestions dried up.
  • Faster lookups: fewer results requested from the MediaWiki API, and the module now waits for a real pause in typing before searching rather than firing on intermediate keystrokes.
  • Cached suggestions are stored as JSON in a per-installation directory rather than as serialized PHP in a shared one.

Full Changelog: v1.4.2...v1.5.0