Skip to content

Create a mock extension of Wikibase #103

Description

@rgaudin

Most of the visual issues we get when mirroring for WikiFundi are Lua Errors raised by a failing call to Wikidata via the Wikibase extension.

Wikibase client extension offers an API to retrieve data from a live WIkidata instance. This can't work offline of course so we can't configure it and thus the API is not present.

This Lua API (mw.wikibase) is uses in a lot of pages (via {#invoke} calls, templates, and modules).

While it's possible for an API user to check whether Wikidata is supported (mw.wikibase != nil), close to no one takes care of this.

We are currently dealing with this by removing parts of pages, or clearing templates that use it. Frequently, that means getting rid of a page's infobox altogether because somewhere down the template dependency graph, there is such a call.

One alternative that could work (needs testing) would be to create an extension providing the mw.wikibase API, returning fake-yet non-breaking data on all methods.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions