[email protected] Posted April 18, 2013 Share Posted April 18, 2013 (edited) After upgrading to Prestashop 1.5.4, we're getting an error on admin saying: Uncaught ReferenceError: jQuery is not defined The first occurrence is on the login page, and points to login.js:7 Looking at the elements in Chrome Inspector, I can see that the following JS files have indeed loaded: login.js jquery.ui.widget.min.js jquery.effect.core.min.js ...and more Prestashop isn't even trying to load jQuery, it's not like it's attempting to load and there's a 404/500 HTTP error with the jQuery .js file. Can anyone shed some light on why this is happening? I've also tried clearing cache etc by manually deleting the smarty compiled templates, nothing works. Edited April 18, 2013 by [email protected] (see edit history) Link to comment Share on other sites More sharing options...
[email protected] Posted April 18, 2013 Author Share Posted April 18, 2013 Problem solved. My _PS_JQUERY_VERSION_ needed a fix! Link to comment Share on other sites More sharing options...
kromiko Posted July 14, 2013 Share Posted July 14, 2013 Problem solved. My _PS_JQUERY_VERSION_ needed a fix! Could you please explain what exactly you have changed/fixed? I'm experiencing the same issue after the upgrade. The only difference that the error is: Uncaught ReferenceError: $ is not defined Link to comment Share on other sites More sharing options...
[email protected] Posted July 15, 2013 Author Share Posted July 15, 2013 Sure thing. Take a look in your config files. It should be defines.inc.php, you need to make sure that the line reading define('_PS_JQUERY_VERSION_', '1.7.2'); is reflecting the correct jQuery version. Take a look inside your ./js/jquery folder to determine which jQuery is available. If you've upgraded do v1.5.4.1, the line above should fix your problem. Link to comment Share on other sites More sharing options...
kromiko Posted July 15, 2013 Share Posted July 15, 2013 my defines.inc.php has define('_PS_JQUERY_VERSION_', '1.7.2'); and there is jquery-1.7.2.min.js under /js/jquery folder finally <script type="text/javascript" src="'._PS_JS_DIR_.'jquery/jquery-'._PS_JQUERY_VERSION_.'.min.js"></script> is in /admin/header.inc.php Have checked further, and it looks like my database is messed up Thanks for the info Josef! Link to comment Share on other sites More sharing options...
[email protected] Posted July 16, 2013 Author Share Posted July 16, 2013 From which version do you have to upgrade? I started at my current company about 5 months ago and I got tasked to upgrade our PrestaShop installation. I had to go from version 1.5.0.9. Our setup is highly custom, we have built plugins for Facebook authentication, as well as a Flash embedding module that allows our users to customise their products. We also have plugins created for direct PayPal payments and about 5 more modules custom to our business. The problem was, the code base I inherited had a lot of bad gremlins I needed to sort out. Modules weren't really modules, the PS core was hacked, modules needed to be decoupled from the PS core, and there was crap loads of redundant, copy pasted code, that got out of sync with bug fixes not applied to all of the copy pasted blocks. I had to rewrite, refactor and fix loads of issues, abstract the redundant bits into more reusable portions, modularize the fragmented modules etc. So kromiko, with upgrading PrestaShop, I totally feel your pain! Fortunately from this point on, it should be smoother sailing with the 1-Click upgrade plugin. Link to comment Share on other sites More sharing options...
kromiko Posted September 19, 2013 Share Posted September 19, 2013 Sorry for the late reply and thanks for your interest. I had to upgrade from 1.4.7 to 1.5.4.1 Someone has already tried to upgrade it and database was corrupted. It was a coctail from PrestaShop 1.4.7 and 1.5.4.1 Have ended up installing clean 1.5.4.1 and transferring all the data from 1.4.7 to 1.5.4.1 Link to comment Share on other sites More sharing options...
Recommended Posts