Uncaught ReferenceError: FindApi is not defined

Vote:
 

Getting this js error in the console on the site: Uncaught ReferenceError: FindApi is not defined .  Identified that FindApi is not part of our custom solution, but rather out-of-the-box with Episerver Find.  Wondering if anyone has seen this before and know what causes this?

Site Details:
EPiServer.CMS version=10.10.1
EPiServer.CMS.Core version=10.10.4
EPiServer.CMS.UI version=10.10.2
EPiServer.CMS.UI.Core version=10.10.2
EPiServer.Commerce version=10.8.0
EPiServer.Commerce.Core version=10.8.0
EPiServer.Commerce.FindSearchProvider version=8.14.3
EPiServer.Commerce.UI version=10.8.0
EPiServer.Commerce.UI.ManagerIntegration version=10.8.0
EPiServer.DeveloperTools version=2.2.2
EPiServer.Find version=12.6.2
EPiServer.Find.Cms version=12.6.2
EPiServer.Find.Commerce version=9.8.0
EPiServer.Find.Framework version=12.6.2

#207123
Sep 10, 2019 20:49
Vote:
 

Through Debugging, i have identified that the issue is coming from the following lines:

<!-- RequiredResourcesFooter -->
<script type="text/javascript" src="https://dl.episerver.net/13.2.2/epi-util/find.js"></script>
<script type="text/javascript">
if(FindApi){var api = new FindApi();api.setApplicationUrl('/');api.setServiceApiBaseUrl('/find_v2/');api.processEventFromCurrentUri();api.bindWindowEvents();api.bindAClickEvent();api.sendBufferedEvents();}
</script>
<!-- /RequiredResourcesFooter -->

These are rendenred on our master page via the below code:

<!-- RequiredResourcesFooter -->
<EPiServer:RequiredClientResources RenderingArea="Footer" ID="RequiredClientResources1" runat="server" />
<!-- /RequiredResourcesFooter -->

Is this a known EpiServer Bug? Are there any workarounds?

#207162
Sep 11, 2019 15:52
Vote:
 

Hi,

We are also having this issue on our sites. Did you eventually find out what was causing the issue ?

thanks in advance!

#210812
Dec 06, 2019 11:05
Vote:
 

This is happening to us too, thousands of times per day.

if(FindApi) is not a safe way to check if FindApi exists in the global scope. A safe if(typeof FindApi === 'function') would have prevented all of these errors.

One reason this is happening is that several content blockers block https://dl.episerver.net/13.2.5/epi-util/find.js and similar URLs.

#210899
Edited, Dec 10, 2019 11:40
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.