The discussion revolves around replacing the Google search box on the custom 404 page with Discourse’s internal site search. Overgrow initially asked how to add a prominent search box to the custom 404 page and replace the Google search box with internal site search. They provided a possible solution using the {{search-text-field}} component and defining a search action on the controller.
Overgrow later shared their findings and asked about modifying the default text for the search box. mcwumbly agreed that internal search would be a better default, especially for private sites.
The conversation also touched on the topic of displaying the Google search box on private sites with login required and SSO enabled. codinghorror suggested that search should be disabled in such cases, while techAPJ confirmed that this change was made three years ago. However, nmagee reported a bug where the Google search box still appears on their private site, which codinghorror verified as a bug.
The discussion concluded with positivejam asking if Overgrow and nmagee found a solution to the issue, as they are experiencing the same problem.
is it possible to add somehow visible prominent search box to custom e.g. 404 page? I see there is google search now, but I would like to replace it with internal site search. Is there any reason why offer google box there instead of internal search?
I’d just like to hack a box with GO button which will redirect to full page search results.
Thanks for input…
I’ve found this code for Handlebars.. using component search-text-field.js.es6
Seems like this should be pretty easy.. After placing this into custom template, the only thing that seems to be missing is “search” action defined on template’s controller which will redirect the search into full page search… Any clues?
Exactly… I see the power of search filtering (in:wiki, …) as killer feature in Discourse… I’d absolutely agree with using internal search whenever possible.
After some time I still wonder if internal search (instead of google search) could or should be included in custom 404 - not found - page… What are your opinions..?
I like sites that extract sensible text from requested url and prefill search query box with it… Currently this is done in google search box and only for /t/ links so this could be improved strongly.. What is your opinion about extending it to all types of urls…?
I’m seeing this topic now – only because I just bumped into the “Google” search box on the 404 page, which no longer makes sense now (especially for our site which is private behind an SSO provider and not visible to Google).
I would vote for moving to the regular internal search.
@techAPJ Our Discourse has login_required checked in the settings, with SSO enabled, and yet if I go to a fictitious page to trigger the 404, I get this with Google search intact. We are running 1.8.0.beta12+60
I am not able to repro this with login required (and SSO) enabled locally or on a hosted instance. Can you PM me the URL of your forum so that I can look into it?
@Overgrow and @nmagee, did you ever get this solved? I’m also getting a Google search box on my 404 page on a site with login required and SSO enabled. Curious what you might have ended up doing to fix.