Topic on Project:Village Pump

Missing buttons on Search page

11
Dcljr (talkcontribs)
Nemo bis (talkcontribs)
Dcljr (talkcontribs)

A quick look through the list of open and closed bugs doesn't seem to show anything relevant. I don't know, but I suspect this feature may not be provided by the extension itself, especially given the existence of things like Manual:$wgNamespacesToBeSearchedDefault.

Nemo bis (talkcontribs)

The checkboxes come from core, but the only difference on this wiki is Cirrus.

FreedomFighterSparrow (talkcontribs)

Gadget:ExternalSearch has a JS error, which causes the rest of the code (or part of it) not to run, including the "check all / none" buttons. Disabling the gadget in preferences seems to solve the issue in my browser. Please check, and we'll see about fixing the gadget :-)

Dcljr (talkcontribs)

OK, yeah, that fixes the problem. Note that the ExternalSearch gadget is on for users by default.

Nemo bis (talkcontribs)

Krinkle recently revised it. Krinkle, can you check the error?

FreedomFighterSparrow (talkcontribs)

It seems the current version does this:

if (searchForm.lsearchbox) {
  searchBox = searchForm.lsearchbox || searchForm.search;
}

While the old one did this:

if (searchForm.lsearchbox) {
  var searchBox = searchForm.lsearchbox;
} else {
  var searchBox = searchForm.search;

Right now, if searchForm.lsearchbox is undefined, then searchBox is undefined. Basically, I believe you just need to remove the surrounding if and let your or do its job.

Nemo bis (talkcontribs)

Thanks. Looks ok now, doesn't it?

Dcljr (talkcontribs)

Works for me. Thanks.

FreedomFighterSparrow (talkcontribs)

Yes, it does, but I'd suggest you remove the if-else and just leave searchBox = searchForm.lsearchbox || searchForm.search;, which does the same and looks much cleaner.

Reply to "Missing buttons on Search page"