Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Why EPIServer find autocomplete giving 403 error?

Ash
Ash
Vote:
 

You do not have permission to view this directory or page.

https://integration.english-heritage.org.uk/find_v2/_autocomplete?callback=jQuery21100714301982099812_1581942930031&prefix=ston&size=5&tags=&_=1581942930032

#217120
Edited, Feb 17, 2020 12:29
Vote:
 

The link you provided is not Find, but an implementation that calls to find. Without knowing about the implementation it's impossible to know why it is returning 403. You would need to contact developer support for further assistance 

#217123
Feb 17, 2020 12:52
Quan Mai - Feb 19, 2020 11:14
I stand corrected. The link is actually registered and handed by Find.UI code.
Vote:
 

Having taken a look at an OOTB install of Find I can see this issue too. From what I've seen, the issue is in the way that the AutocompleteController (shipped as part of Find in EPiServer.Find.Framework.UI.Rest) is handling JSONP requests (i.e. requests with a "callback" parameter). Ultimately this looks like a bug.

I'd assume the request isn't cross-domain and so there's not a reason why it couldn't be made as a standard JSON request rather than a JSONP request so, as a workaround, you could change:

dataType: 'jsonp'

to

dataType: "json"

in your jQuery ajax call. This should remove the "callback" parameter from the call and cause the controller to return just the JSON data rather than wrapping it in a callback. As you're using jQuery, the implementation and processing of the call behind the scenes is masked and so the remainder of your JS shouldn't need altering and the autocomplete should start working again.

#217128
Edited, Feb 17, 2020 18:34
Ash
Vote:
 

Hey Paul, thanks for the reply.

But can you please tell from where data is coming?

It is an ajax call and this path isn't in my code

https://integration.english-heritage.org.uk/find_v2/_autocomplete

#217140
Feb 18, 2020 12:53
Vote:
 

As far as I'm aware, the stats are held within Find and that API is a way of accessing them. The API endpoint '/find_v2/_autocomplete' maps to EPiServer.Find.Framework.UI.Rest.AutocompleteController within the EPiServer.Find.Framework library which is a core part of the Find client and hence will have been added when you added Find to your project.

#217209
Feb 19, 2020 11:09
Vote:
 

I am also running into same issue when trying to test it on AlloyDemoKit. Did we got solution to above problem? Thanks in advance for the help.

Below is URL which gives 403

http://localhost:2030/find_v2/_autocomplete?prefix=Alloy&size=5&callback=jQuery19105857890212712183_1592757241792&_=1592757241795

#224481
Jun 21, 2020 16:42
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.