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:
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
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
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