User blog:Ciencia Al Poder-fduser/Search suggest in Monobook


 * Issue solved. Comments closed

Hi, people. Today I want to share with you another fix for Monobook, as I stated on the post about updates. This time Wikia broke the Search Suggestions in Monobook. Yes, It was working fine until Wikia broke it for no reason EDIT: OK, let's assume good faith here, and that they do not intentionally broke it, although that's not my opinion having previous experiences with that.

If you type something in the search box of the sidebar, there are no search suggestions. This is happening since 1 month ago, but as always, they refuse to fix things that they broke previously, arguing it's an obsolete skin, although on my wiki the majority of our users use Monobook instead of Oasis.

Because of that, and as I stated several times, if you find something broken that you can fix yourself with CSS or JS, don't wait for Wikia to fix that and fix it yourself.

The breakage this time consisted of leaving out the Javascript file of the search suggest. So the fix is as simple as to include it again, putting the following code in MediaWiki:Monobook.js:

// Patch for MWSggest, broken by Wikia $(function {	if (!window.os_MWSuggestInit) {		importScriptURI(stylepath+'/common/mwsuggest.js?'+wgStyleVersion);	} });

No credit needed. This script would load that file only if it wasn't loaded already, since it checks for the os_MWSuggestInit presence.

That's, all. Enjoy your Wikia experience&reg;.