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.
- 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.
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.