prime1974 Posted March 24, 2014 Share Posted March 24, 2014 Hi guys! I have just upgraded my Prestashop 1.5.6 to the latest stable build 1.6.0.5. Several modules (minic slider, language block) stop working correctly once I activate the Javascript Smart Cache option in: Performance -> Smart Cache for Javascript Apparently the jQuery libraries are not loaded any more once Smart Cache for Javascript is activated.Does anybody have a clue why this may happen? Once I deactivate the Javascript Smart Cache everything works fine again. As I don't have the website on a public domain I can send codes in PMs - if necessary. Thank you very much for your help. Link to comment Share on other sites More sharing options...
inweb Posted March 24, 2014 Share Posted March 24, 2014 There is a chance to find out what's wrong there only live. Since it is only you who can see it, open-up JS console http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers https://developers.google.com/chrome-developer-tools/docs/console#opening_the_console Check for errors there and post what you find. 1 Link to comment Share on other sites More sharing options...
prime1974 Posted March 24, 2014 Author Share Posted March 24, 2014 Hi and thank you for the quick reply! I will add both console examples. First the working example Javascript smart cache deactivated: <initialize> Entering... url: http://artedelmediterraneo.com/es/ websiteLogon.js:21 <connectBG> Entering websiteLogon.js:267 <connectBG> currentPort: [object Object] websiteLogon.js:270 <processSpecialWebsite> Entering websiteLogon.js:65 <processSpecialWebsite> http://artedelmediterraneo.com/es/ websiteLogon.js:69 <attachSinkToForms> Entering websiteLogon.js:759 <isOnePasswordForm> inputArray.length:4 websiteLogon.js:629 <isOnePasswordForm> passwordCount: 0 websiteLogon.js:658 <isOnePasswordForm> inputArray.length:0 websiteLogon.js:629 <isOnePasswordForm> passwordCount: 0 websiteLogon.js:658 <attachSinkToForms> Exitting websiteLogon.js:771 <callJSFunction> -- url: http://artedelmediterraneo.com/es/ websiteLogon.js:1104 <addEmbed> embed adding. websiteLogon.js:1000 <addEmbed> embed add completed. Second console output with JSC activated: Uncaught SyntaxError: Unexpected identifier /themes/theme749/cache/v_1_045306a5aa3c4ba65d12f0ece069df8e.js:159 Uncaught TypeError: undefined is not a function /themes/theme749/js/source/bootstrap.js:29 Uncaught ReferenceError: jQuery is not defined /themes/theme749/js/source/plugins.js:177 Uncaught ReferenceError: jQuery is not defined /themes/theme749/js/source/footable.js:407 Uncaught ReferenceError: jQuery is not defined /themes/theme749/js/source/jquery.core-ui-select.js:442 Uncaught ReferenceError: jQuery is not defined /themes/theme749/js/source/jquery.scrollpane.js:4 Uncaught ReferenceError: jQuery is not defined /themes/theme749/js/source/jquery.uniform.js:1068 Uncaught ReferenceError: jQuery is not defined /themes/theme749/js/source/jquery.mousewheel.js:84 Uncaught ReferenceError: $ is not defined mainscript.js:1 Uncaught ReferenceError: jQuery is not defined jquery.carouFredSel-6.2.1.js:16 Uncaught ReferenceError: jQuery is not defined jquery.touchSwipe.min.js:1 Uncaught ReferenceError: $ is not defined As I stated before I suspect that the JS smart cache in some way causes jQuery to not being loaded.So far it seems to be clear that jQuery isn't loaded properly. The question is why and does smart cache do that it happens.Cheers and thx again! Link to comment Share on other sites More sharing options...
inweb Posted March 25, 2014 Share Posted March 25, 2014 Please also attache the page HTML source code with and without JavaScript Smart Cache enabled. Link to comment Share on other sites More sharing options...
prime1974 Posted March 26, 2014 Author Share Posted March 26, 2014 (edited) I will send you the codes in a PM, as they contain URLs which will not be reachable for Google and I want to avoid future 404 errors. Edited March 26, 2014 by prime1974 (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2014 Share Posted March 26, 2014 this post is useful http://www.prestashop.com/forums/topic/311805-why-js-files-in-end-of-body-in-16/?p=1579806 Link to comment Share on other sites More sharing options...
prime1974 Posted May 16, 2014 Author Share Posted May 16, 2014 Thank you very much all and sorry for the delay.Suddenly everything started working. I have no explanation for what happened! Cheers! 1 Link to comment Share on other sites More sharing options...
Galadrum Posted September 9, 2014 Share Posted September 9, 2014 I have exactly the same problem. When smartcache not activated, all javascript and jquery is loaded (in source code). Once activated, it isn't loaded anymore thus lots of problems. Hope it will magically work like you Link to comment Share on other sites More sharing options...
Recommended Posts