Search AJAX not working


(Cameron Wong) #1

Hi -

You may remember me from these shenanigans. We’re almost back to normal, but ever since we reinstalled discourse from scratch, we seem to have lost the ability to search from the navbar.

Specifically, when you type into the search bar it typically auto-updates (this behavior is consistent on this site and try.discourse) with results without actually having to hit enter. On our site, however, the search dropdown itself will only display “no results found” until the user presses enter and is taken to the search result screen (which works as expected).

I’m not sure what information would be relevant to include, so please let me know how I can figure out what else I’m doing wrong.


(Régis Hanol) #2

Are there any errors in the JavaScript console?


(Cameron Wong) #4

Not that I can see. I checked the network log and the response seems normal
(if with no data) as well.


(cpradio) #5

What plugins (if any) do you have installed?


(Cameron Wong) #6


(Mittineague) #7

Is that “discourse-bbcode-spoiler” this one?
https://github.com/lukegb/discourse-bbcode-spoiler/blob/master/assets/javascripts/bbcode_spoiler_dialect.js

If so it looks like it hasn’t seen a commit since last July.

And I’ve never heard of the BetterMarkdown window object.

Found it.
vendor/assets/javascripts/better_markdown.js

})(function() {
  window.BetterMarkdown = {};
  return window.BetterMarkdown;
}());

In any case, there have been some changes in the way plugins work since 11 months, I’d definitely try disabling / uninstalling that one at least.


(Cameron Wong) #8

It’s been a while, but I think that’s the one. It’s supposed to provide collapsing text “spoiler tags” (which we need more for the collapse functionality than to actually hide spoilers)


(Jeff Atwood) #9

That is already built in supported using the html5 detail expand tag.


(Cameron Wong) #10

whether or not that is the case, disabling it doesn’t seem to fix the issue