I have one particular form which works fine 90% of the time, but the rest of the time I receive an error on load that looks like this:
Here's the URL: https://www.isee.bad-dev.com/publications/subscribe
The call stack shows this is occurring on Class.initialize, during the creation of the FbForm object in media/com_fabrik/js/fabrik-min.js. Sometimes it occurs on other resources as well, including element-min.js and tipsBootStrapMock-min.js.
I do have a lot of custom JS on this particular script, but nothing I can see that might interfere with the creation of the form object. The particularly vexing part is that it only happens every once in a while, making it hard to debug.
The intermittent nature of the issue leads me to believe that something is being triggered before all the libs are fully loaded, but most of the time the network is fast enough that the problem doesn't present itself. I just can't figure out why only this one form would be affected.
UPDATE:
Apparently these intermittent errors are eventually followed up by a require.js timeout error:
So, as suspected, a script is firing off before its dependencies are met, rather than via a callback.
I've got Debug JS enabled in Fabrik options.
Code:
Uncaught TypeError: Object [object Object] has no method 'setOptions'
Here's the URL: https://www.isee.bad-dev.com/publications/subscribe
The call stack shows this is occurring on Class.initialize, during the creation of the FbForm object in media/com_fabrik/js/fabrik-min.js. Sometimes it occurs on other resources as well, including element-min.js and tipsBootStrapMock-min.js.
I do have a lot of custom JS on this particular script, but nothing I can see that might interfere with the creation of the form object. The particularly vexing part is that it only happens every once in a while, making it hard to debug.
The intermittent nature of the issue leads me to believe that something is being triggered before all the libs are fully loaded, but most of the time the network is fast enough that the problem doesn't present itself. I just can't figure out why only this one form would be affected.
UPDATE:
Apparently these intermittent errors are eventually followed up by a require.js timeout error:
Code:
Uncaught Error: Load timeout for modules: fab/window-min,fab/elementlist-min,element/checkbox/checkbox-min
http://requirejs.org/docs/errors.html#timeout
So, as suspected, a script is firing off before its dependencies are met, rather than via a callback.
I've got Debug JS enabled in Fabrik options.