Global standalone search box not populating query value
I'm working on a project that is upgrading from coveo 3.0 to coveo 4.0(450). We have a custom global search box in the header, that is working correctly with it's omnibox.
However, when the user is redirected to the search page, the standalone box does not prefill the query value, and the search term is ignored. I can see the q? value being passed in the url string correctly, so we must have an issue on the search page. We are using a custom search sublayout, and connecting the global search box to this layout as follows:
and then :
Our search div has id search, and the global searchbox is tagged with the class CoveoSearchbox. I've confirmed that the componentsOptions are being set correctly as well.
I've tried loading the components options on the searchbox control, using the same IsOnSearchPage function, but the results have been the same.
Do you have any other suggestions on what I could try?
I have heard that since the September 2016 release of Coveo for Sitecore 4.0, external components array needs to contain DOM elements instead of jQuery elements. This is a regression from the previous releases and will be supported again in the upcoming January 2017 release of Coveo for Sitecore 4.0.
In the meantime, you can workaround the issue using:
searchOptions.externalComponents = [document.getElementById("<%= Model.SearchboxId %>")];