Jump to content

Prestashop 1.6 jQuery problems with enabled smart cache on custom theme


Recommended Posts

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

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.

  • Like 1
Link to comment
Share on other sites

Hi and thank you for the quick reply!

 

I will add both console examples.

 

First the working example Javascript smart cache deactivated:

 

<connectBG> Entering websiteLogon.js:267
<connectBG> currentPort: [object Object] websiteLogon.js:270
<processSpecialWebsite> Entering websiteLogon.js:65
<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
<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

  • 1 month later...
  • 3 months later...
×
×
  • Create New...