Gravatar for

Question by simonbyrne, Dec 4, 2015 6:11 AM

Value of Model.GetSearchPageUrl() not being injected on just one language

We have a really strange issue where Coveo (for Sitecore) is not initialising correctly on just one language (Norwegian) on one publishing target (www). It is working correctly on every other language. It is also working correctly in Norwegian on other publishing targets (stage).

The javascript code should be written out to the browser as follows:

Coveo.$(function () {
    Coveo.$('#ifsglobalsearch').coveo('initSearchBox', '/no/search/');

However, the second argument (/no/search/) is not making its way to the browser on www. It's completely empty. The back-end code that populates this is:

Coveo.$('#@Model.SearchBoxUniqueId').coveo('initSearchBox', '@Model.GetSearchPageUrl()');

So it appears that Model.GetSearchPageUrl() is not working correctly in this one language and publishing target. We've checked the control configuration, republished, republished the search page, etc. all to no avail.

Has anybody seen this before?

Gravatar for

Comment by Sébastien Belzile, Dec 4, 2015 8:21 AM

Is there anything in your logs?

The search page URL is computed using the LinkManager. What are the properties of your LinkManager? Do you use a custom LinkProvider?

0 Reply
Ask a question