Terraria Mods Wiki

Search bar suggestions with the Hydralize gadget[]

Hey Westgrass, I recently copied the Hydralize gadget from the vanilla wiki. For some reason, unlike there, the search bar suggestions do not show up on this wiki – see MediaWiki talk:Gadget-hydralize.js. I figured the mediawiki.searchSuggest module is the culprit, but I don't know how to fix it. The module shows up as loaded via mw.loader.getState(), and re-loading it via mw.loader.load() or mw.loader.using() has no effect, so apparently it is fully loaded. Yet, it doesn't work as expected: The <div> that is supposed to contain the suggestions is not even in the DOM (the internally dependent module jquery.suggestions seems fully loaded as well, for what it's worth). Copying the source code of the module from the MW core and pasting it in the browser console works without any problems; the <div> is created and the suggestions show up. I saw that you copied the search bar part from someone else's code, but still, maybe you have an idea how to resolve this? --Rye Greenwood (talk) 19:48, 28 September 2021 (UTC)

In fact, it does not always work on vanilla wiki, too. I'm looking for a solution. --Westgrass (talk) 08:46, 29 September 2021 (UTC)
fixed. --Westgrass (talk) 09:32, 29 September 2021 (UTC)
Thanks! --Rye Greenwood (talk) 12:53, 29 September 2021 (UTC)