Closed ghost closed 7 years ago
This issue was caused by the cyber source extension from magedelight. They loaded a js file in the header which changed the load order of jQuery UI.
Just for future reference to anyone that might have the same issue.
If you're having issues with Safari browsers, which is often one of the following errors: TypeError: undefined is not an object (evaluating '$.ui.dialog') TypeError: undefined is not an object (evaluating '$.ui.timepicker')
you likely have either a 3rd party extension or external JS that's loading jQuery library which doesn't load jquery/ui as well (Magento one does).
Our case was that we have had CDN with HTTP2 implemented, where all resources are loaded simultaneously. 3rd party JS loaded jQuery before Magento jQuery was loaded.
As no Magento scripts depend on "jquery/ui", but only "jquery", this triggered all Magento scripts depending on "jquery" to start loading, and error out once they reached parts that required "jquery/ui".
The fix was to remove the 3rd party script in question (in our case, this was Klaviyo subscribe script http://www.klaviyo.com/media/js/public/klaviyo_subscribe.js )
If you have allot of extensions installed you can notice race conditions with require js. The biggest one I found so far is with jquery ui.
To fix
app/code/Magento/Theme/View/Frontend/requirejs.config.js
comment out //"mage/dataPost",
and add a shim
the complete file should look like
Preconditions
Steps to reproduce
Expected result
Actual result