Gravatar for

Question by Dan Cruickshank, Jun 25, 2015 10:46 AM

Coveo 6 - Mobile results linking to cached pages

Working on a Coveo 6, created a custom skin, very little customization. No effort has ever been made to change search results on a mobile device, so what is happening appears to be default.

When the search is loaded on a mobile device (using device emulation in chrome works) a "mobile" version of the results is loaded.

The problem is, when this mobile view is used the search results link to cached search results like this instead of using the normal url.

I found conditional logic referencing "IsBlackBerry" but I couldn't see any changes related to this take affect.

Thanks for your help!

Gravatar for

Comment by Pascale L'Heureux, Jun 25, 2015 11:31 AM

Would that help: ? Don't think we've tested it in Coveo 6 though.

Gravatar for

Comment by Dan Cruickshank, Jun 25, 2015 11:46 AM

So that looks to be exactly the issue. Couldn't find it. Didn't know what to search for I guess. :)

In Coveo 6, we're only specifying a single default search interface. I don't believe there is a separate area to declare a mobile-specific skin. Would I still alter the same ResultsPanel.ascx?

Always terrified making changes like that, inline. :)

Gravatar for

Comment by ronald, Jun 25, 2015 12:49 PM

If you are using the same skin for both mobile and non-mobile browsers, yes, you could modify the ResultsPanel.ascx file of you shared/unique skin. In the OnInit() method of the second sample, there is a condition on (Browser.IsIpad). Depending on your needs, that condition could be changed for (Browser.IsMobile). Such a condition make sure to affect only mobile browsers and not non-mobile browsers. So it's safe. :)

Gravatar for

Comment by Dan Cruickshank, Jun 26, 2015 6:02 PM

So I believe we've found the file.

Coveo: 6.0 x64 Build 3701

Interface: Mobile Default Skin: MobileDefault

File: /MobileDefault/ResultPanel.ascx

When we use emulation, we can see that's loaded. HOWEVER…

We can't see any changes we make to ResultsPanel.ascx manifest in the results. Even manually throwing an Exception (!) in the inline OnInit does nothing.

Are these outputs or controls cached by Coveo? Do we need an IIS reset? It's a production server, so it's not the easiest to take down. I'm wondering what we're missing. I can't see any changes taking affect.

Thoughts? Thanks!

Gravatar for

Comment by ronald, Aug 5, 2015 3:59 PM

I haven't been notified when you replied. Sorry for the delay. Maybe you have already solved your issue?

If even throwing an exception from an inline OnInit() in ResultsPanel.ascx has no effect, that means that the file is not used to render the page in the browser. It's probably another skin that is used. In the file where the SearchHub control is defined (usually default.aspx), you could add something like this to help finding out: <%=h.ActiveInterface.InterfaceSettings.Skin %>

An IIS reset is normally not needed after a change in a skin file.

1 Reply
Gravatar for

Answer by Pascale L'Heureux, Jun 25, 2015 1:05 PM

Here is a great developer page to help you with this:

(just so you have an answer to accept :) )

Ask a question