Trying to access Special:UnusedFiles on Wikibooks throws the following error:
```
2018-05-09 21:45:27 [WvNr9wpAAEYAADLcbywAAAAV] mw1275 enwikibooks 1.32.0-wmf.3 exception ERROR: [WvNr9wpAAEYAADLcbywAAAAV] /wiki/Special:UnusedFiles MWException from line 167 of /srv/mediawiki/php-1.32.0-wmf.3/includes/Hooks.php: Invalid callback Wikibase\LibHooks::onGalleryGetModes in hooks for GalleryGetModes
{"exception_id":"WvNr9wpAAEYAADLcbywAAAAV","exception_url":"/wiki/Special:UnusedFiles","caught_by":"mwe_handler"}
[Exception MWException] (/srv/mediawiki/php-1.32.0-wmf.3/includes/Hooks.php:167) Invalid callback Wikibase\LibHooks::onGalleryGetModes in hooks for GalleryGetModes
#0 /srv/mediawiki/php-1.32.0-wmf.3/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#1 /srv/mediawiki/php-1.32.0-wmf.3/includes/gallery/ImageGalleryBase.php(133): Hooks::run(string, array)
#2 /srv/mediawiki/php-1.32.0-wmf.3/includes/gallery/ImageGalleryBase.php(103): ImageGalleryBase::loadModes()
#3 /srv/mediawiki/php-1.32.0-wmf.3/includes/specialpage/ImageQueryPage.php(48): ImageGalleryBase::factory(boolean, RequestContext)
#4 /srv/mediawiki/php-1.32.0-wmf.3/includes/specialpage/QueryPage.php(671): ImageQueryPage->outputResults(OutputPage, SkinVector, Wikimedia\Rdbms\DatabaseMysqli, Wikimedia\Rdbms\ResultWrapper, integer, integer)
#5 /srv/mediawiki/php-1.32.0-wmf.3/includes/specialpage/SpecialPage.php(522): QueryPage->execute(NULL)
#6 /srv/mediawiki/php-1.32.0-wmf.3/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)
#7 /srv/mediawiki/php-1.32.0-wmf.3/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#8 /srv/mediawiki/php-1.32.0-wmf.3/includes/MediaWiki.php(861): MediaWiki->performRequest()
#9 /srv/mediawiki/php-1.32.0-wmf.3/includes/MediaWiki.php(524): MediaWiki->main()
#10 /srv/mediawiki/php-1.32.0-wmf.3/index.php(42): MediaWiki->run()
#11 /srv/mediawiki/w/index.php(3): include(string)
#12 {main}
```