Page MenuHomePhabricator

Add option to disable Wikibase’ custom search box
Closed, ResolvedPublic3 Estimated Story Points


As a wiki administrator, I want to be able to install Wikibase on an existing wiki without disturbing its current users.

Wikibase unconditionally overrides MediaWiki’s standard search box with a custom search box that only searches items. That’s fine for Wikidata, and for other wikis where the Wikibase repository is the main functionality, but it’s a problem if there’s also other interesting stuff on the wiki, as on the OpenStreetMap wiki where @Yurik recently set up Wikibase.

Acceptance criteria:

  • There is an option to disable the custom search box and leave the standard search box in place.

This is a super ugly hack, but it works, at least on my local wiki:

// add this after the Wikibase extension is loaded
$wgResourceModules['wikibase.ui.entitysearch']['scripts'] = [];

However, this may not be possible in more complicated setups, depending on how settings are loaded there.

Implementation note:
The search box is implemented in the wikibase.ui.entitysearch ResourceLoader module, which is added to output pages in the RepoHooks::onBeforePageDisplay function. Presumably it shouldn’t be too difficult to make that hook handler check for a config variable.

It should be noted alongside the config var that it is intended to be removed once T190454 is resolved.

Event Timeline

See also community discussion thread (update link fixed)

Do I understand this right that is is for the case when a) Main namespace is not an entity namespace and b) you do not want the search box to actually search entity namespaces?

T190454: Display entity & article namespace completion search together should of course solve this but I feel it's long way to go so an option to remove the override is a plus. Fulltext search in entities will still work.

@Smalyshev correct. Ideally we should have T190454, but unless we want to stop using wikibase until it is ready, this is a good interim solution.

Addshore updated the task description. (Show Details)
Addshore set the point value for this task to 3.
Addshore moved this task from Ready to estimate to In Progress on the Wikidata-Campsite board.
Addshore triaged this task as Medium priority.Oct 2 2018, 1:38 PM

Change 469872 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/Wikibase@master] Add option to disable entity search UI

Change 469872 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add option to disable entity search UI