Gravatar for tom.prebish@paragon-inc.com

Question by mothertraintom, Aug 13, 2014 1:22 AM

Clickable URI has spaces replaced with dashes

Hello,

Whenever i rebuild my index, the Clickable URI of my items has spaces replaced with dashes. This is problematic since the link to the item 404s because the sitecore item name does not contain dashes. Is this expected behavior? I will note that at one point we were using an encodeNameReplacement to replace " " with "-". However, this setting has long since been removed. I've restarted the Coveo services, rebuilt my indexes but still, the Clickable URI has spaces replaced with dashes. Am I missing something?

Tom

1 Reply
Gravatar for vseguin@coveo.com

Answer by Vincent Séguin, Aug 13, 2014 7:43 AM

Hi,

Are you in Coveo for Sitecore? Or with another source? We would need more details about your setup… If you're in Coveo for Sitecore, i already saw this behavior, it was because of an encodeNameReplacement indeed. If you do a showconfig.aspx on your sitecore source, what is your encodeNameReplacement's looking like?

As a workaround, you could code a really small CoveoPostItemProcessingPipeline (see Using the Coveo Pipelines) where you have access to the coveo item before it is indexed. You could do something like :

p_Args.CoveoItem.ClickableUri = p_Args.CoveoItem.ClickableUri.Replace("-", " ");
Gravatar for tom.prebish@paragon-inc.com

Comment by mothertraintom, Aug 13, 2014 9:14 AM

Vincent,

Yes, this is Coveo for Sitecore. Doing a showconfig indeed confirms that there is no encodeNameReplecement for spaces. Yet, Coveo is still adding dashes to item names to replace spaces. Is this setting cached somewhere by Coveo?

Tom

Gravatar for vseguin@coveo.com

Comment by Vincent Séguin, Aug 13, 2014 9:38 AM

Nothing cached. We're using the Sitecore LinkManager directly to resolve the clickable uris, almost no processing done on our side. Are you using a different LinkManager than the default one? Do you have a specific LinkManager configuration?

Gravatar for klutz@absolute.com

Comment by krislutz, Nov 25, 2014 7:24 PM

I have a related question to this. In our Sitecore installation we have changed the linkmanager provider in the web.config to a custom linkmanager which overrides the sitecore class. As far as I can tell Coveo ignores the fact that the linkprovider has changed and still uses the default sitecore linkprovider when forming the clickuri. How would we point Coveo to our custom linkprovider so it generate the correct URI?

Gravatar for vseguin@coveo.com

Comment by Vincent Séguin, Nov 25, 2014 7:27 PM

Hello,

Coveo is supposed to use your custom link provider. Have you tried reindexing after changing your links? If not, you can create your own CoveoPostItemProcessing processor to change the clickable uris of documents. See an example here : https://developers.coveo.com/display/public/SC201411/Indexing+Documents+with+Custom+Pipeline+Processor

Ask a question