Content Recommendation Block

Vote:
 

Hi,

I am trying to use the content recommenation block as per the github repo https://github.com/episerver/ContentRecommendationBlock.

However when I run the example code it does not return any results.

I then tried the api endpoint using postman and this was able to return the results fine.

Has anyone else tried to use this block and had similar issues?

Thanks

Paul

#197780
Oct 12, 2018 12:58
Vote:
 

Hi Paul,

As you can see the code here: https://github.com/episerver/ContentRecommendationBlock/blob/master/Services/RecommendationsController.cs#L43 

After receiving data from RecommendationService, it will try to resolve friendlyUrl from the result's ContentLink. So I think the reason might be:

  • RecommendationService returns no data.
  • Returned data do not match with any content in the current site (because using the same setting/keys for several sites...).

I've tested the sample block and the result might differ between users (anonymous, logged-in users...), but I think you should debug the code for sure.

Phu

#198797
Nov 07, 2018 5:14
Vote:
 

Hi Phu,

I know the Recommendation Service has data, it was just strange that if we called that controller over ajax it works perfect, but if we used this as a normal block and passed the data back in the viewmodel it wouldn't.

I was therefore thinking it must be looking for something from the request that it needs to communicate with the RecommendationService.

We have went with the ajax approach for now, but would like to know more why this call to the recommendation service would not work in a normal controller call.

Thanks

#198825
Nov 07, 2018 10:00
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.