Magento, PHP, MySQL, AJAX, Zend, cPanel or OpenSource…
How to fix Fooman speedster in Magento 1.3.2.4: Fatal error: Uncaught exception ‘JSMin_UnterminatedStringException’
After installing Fooman Speedster on Magento version 1.3.2.4, got several javascript errors. Both admin menu and front-end menu stopped to work.
I got the following error:
Fatal error: Uncaught exception 'JSMin_UnterminatedStringException' with message 'Unterminated String: '\'\\*\\+/=\\?\\^_`\\{\\|}~-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,})/i.test(v)'
How have I fixed it?
First, I opened the following url for which I was getting this error, copied from Firefox’s Firebug extension.
http://127.0.0.1/magento/skin/m/1264961510/js/prototype/prototype.js,/js/prototype/deprecation.js,/js/prototype/validation.js,/js/scriptaculous/builder.js,/js/scriptaculous/effects.js,/js/scriptaculous/dragdrop.js,/js/scriptaculous/controls.js,/js/scriptaculous/slider.js,/js/varien/js.js,/js/varien/form.js,/js/varien/menu.js,/js/mage/translate.js,/js/mage/cookies.js,/js/sb/src/js/lib/yui-utilities.js
Obviously you should see the same error till now.
Now, I removed one js file and requested the above URL, how? say you would want to remove validation.js, then URL should be
http://127.0.0.1/magento/skin/m/1264961510/js/prototype/prototype.js,/js/prototype/deprecation.js,/js/scriptaculous/builder.js,/js/scriptaculous/effects.js,/js/scriptaculous/dragdrop.js,/js/scriptaculous/controls.js,/js/scriptaculous/slider.js,/js/varien/js.js,/js/varien/form.js,/js/varien/menu.js,/js/mage/translate.js,/js/mage/cookies.js,/js/sb/src/js/lib/yui-utilities.js
Notice I have removed /js/prototype/validation.js,
Ok, now there is no more error. So, the error is somewhere in the validation.js. In Magento 1.3.2.4, open the /js/prototype/validation.js and need to replace Line no 431
return Validation.get('IsEmpty').test(v) || /^[a-z0-9,!\#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,})/i.test(v)
with
return Validation.get('IsEmpty').test(v) || /^([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*@([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*\.(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]){2,})$/i.test(v)
Should work fine now.
Thanks!
| This entry was posted by admin on November 6, 2010 at 9:19 pm, and is filed under General, Magento. Follow any responses to this post through RSS 2.0. You can skip to the end and leave a response. Pinging is currently not allowed. |
about 1 year ago
Thank you very much this helped me out heaps!
about 11 months ago
Installing version 1.1.3 of Speedster should also do the trick – see the Connect description.
about 8 months ago
Thanks, worked great for 1.3.2.4 !