AnsweredAssumed Answered

FireFox Errors using SUGAR.App.cache.cutAll() and SUGAR.App.sync() in Sugar 7.2 and 7.5

Question asked by chadhutchins on Feb 11, 2015
Hi everyone!

Is anyone else getting a "TypeError: key.indexOf is not a function" javascript error when running SUGAR.App methods in FireFox?

We're seeing the error specifically in FireFox (Chrome is fine) on Sugar 7.2 and Sugar 7.5 when we run SUGAR.App.cache.cutAll() and SUGAR.App.sync().

Below is background for why we do this:

During the setup/onboarding process of SugarChimp for Sugar 7 we use window.parent.SUGAR.App.cache.cutAll() and window.parent.SUGAR.App.sync() to refresh the client/browser cache so that the new views we load for SugarChimp are immediately available without a hard-refresh of the browser. 

This way, immediately after installation completes we can redirect the customer to the SugarChimp onboarding pages. 

If those methods are not run or if the customer does not do a hard refresh on the browser, they will see the "Data not available" error when we redirect them.




Our process works just fine today in Chrome, but Firefox is throwing errors from the Sugar javascript and I'm not sure how to get around it.

Have the methods been deprecated? Are there better methods to use that do the same thing?

Thanks!

Outcomes