Hey
I am getting an error in my console log and for the love of me I can not figure it out. The error is for Uncaught SyntaxError: Unexpected String in the site.js file. My site is wagbrag.com. I am using cloudflare for caching and it hard to tell exactly where the error is but I believe it could be between line 1379 and 1417 in the site.js file. I beleive this error is causing issues with my Revolution slider.
Not sure if its related but I am also getting Uncaught ReferenceError: SlideContentComplete is not defined. See the scrip below.
<script>
jQuery(document).ready(function() {
jQuery("#td_uid_3_54dc151b8ce87").iosSlider({
snapToChildren: true,
desktopClickDrag: true,
responsiveSlides: true,
keyboardControls: false,
infiniteSlider: true,
navPrevSelector: jQuery("#td_uid_3_54dc151b8ce87 .prevButton"),
navNextSelector: jQuery("#td_uid_3_54dc151b8ce87 .nextButton"),
onSliderResize: td_normal_slide_resize_update_vars_td_uid_3_54dc151b8ce87,
onSlideComplete: slideContentComplete,
onSlideStart: slideStartedMoving
});
/*
* Resize the iosSlider when the page is resided (fixes bug on Android devices)
*/
function td_normal_slide_resize_update_vars_td_uid_3_54dc151b8ce87(args) {
if(td_detect.is_android) {
setTimeout(function(){
jQuery("#td_uid_3_54dc151b8ce87").iosSlider("update");
}, 1000);
}
}
});
</script>
Any help would be greately appreciated.
Hi,
Did you enabled js minification on cloudflare? if you did disable it.
If you updated the theme recently purge all files on Cloudflare.
Also try to disable all plugins enable Visual Composer, check for errors, then enable the other theme plugins one by one followed by the rest of the plugins until you find the one that’s causing this issue.
Thank you, Emil G.
Sorry to bring up an old topic, but I just encountered this too. It is important to me that I can minify my site’s JavaScript. I have looked into this and the cause seems to be that site.js contains two “use strict” statements (on lines 1474, 2727, 3544, and 3988) where the following statement has not been ended with a semi-colon (i.e. there is a closing curly brace which needs a semi-colon after it).
If I make that change then this problem resolves itself.
However, I also notice that there is a min/site.min.js file. Is there a way to trigger Newsletter to load these minified files rather than the unminified ones?
Thank you!
Adam
-
This reply was modified 11 years by
adamcharnock.
Thank you Emil. I’ll look into speed booster.
If those semi-colon changes could be in .5 I’d be very grateful indeed.
Hi,
You can rename the original js file to make the them use the minified version or you could change the paths here: http://screencast.com/t/hk2piNcDE
This will be fixed in theme’s version 5.
Thanks
