Jump to content

Fatel Error: JSMinException - When Preferences>Performance settings have Compress inline JavaScript in HTML after "smarty compile" execution


Recommended Posts

Fatal error: Uncaught exception 'JSMinException' with message 'Unterminated string literal.' in /home/tinao/public_html/tools/js_minify/jsmin.php:94 Stack trace: #0 /home/tinao/public_html/tools/js_minify/jsmin.php(235): JSMin->action(1) #1 /home/tinao/public_html/tools/js_minify/jsmin.php(64): JSMin->min() #2 /home/tinao/public_html/classes/Tools.php(1253): JSMin::minify('var baseDir = '...') #3 /home/tinao/public_html/classes/Tools.php(1240): ToolsCore::packJS('var baseDir = '...') #4 /home/tinao/public_html/classes/Tools.php(1231): ToolsCore::packJSinHTMLpregCallback(Array) #5 /home/tinao/public_html/config/smarty.config.inc.php(197): ToolsCore::packJSinHTML('/\s*(<script\b[...', Array, '<html <html xmlns="ht...') #7 /home/tinao/public_html/tools/smarty/Smarty.class.php(337): Smarty_Internal_Filter_Handler::runFilter('<html

site name is: www.turbosupplycenter.com

working site when blank with only this error.. only had 4 modules installed on plain ol 1.4.17 standard prestashop.. nothing else changed.
4 modules are:
wcontent maker
jbx menue
sliding according
jcaroursel

errors showing in firebug are:

baseDir is not defined
[break On This Error] url: baseDir + 'cart.php',

ajax-cart.js (line 122)
unterminated string literal

[break On This Error] var priceDisplayPrecision = '2;
home (line 18)

baseDir is not defined
[break On This Error] url: baseDir + 'cart.php',

Link to comment
Share on other sites

  • 2 weeks later...
Fatal error: Uncaught exception 'JSMinException' with message 'Unterminated string literal.' in /home/tinao/public_html/tools/js_minify/jsmin.php:94 Stack trace: #0 /home/tinao/public_html/tools/js_minify/jsmin.php(235): JSMin->action(1) #1 /home/tinao/public_html/tools/js_minify/jsmin.php(64): JSMin->min() #2 /home/tinao/public_html/classes/Tools.php(1253): JSMin::minify('var baseDir = '...') #3 /home/tinao/public_html/classes/Tools.php(1240): ToolsCore::packJS('var baseDir = '...') #4 /home/tinao/public_html/classes/Tools.php(1231): ToolsCore::packJSinHTMLpregCallback(Array) #5 /home/tinao/public_html/config/smarty.config.inc.php(197): ToolsCore::packJSinHTML('/\s*(<script\b[...', Array, '<html <html xmlns="ht...') #7 /home/tinao/public_html/tools/smarty/Smarty.class.php(337): Smarty_Internal_Filter_Handler::runFilter('<html

site name is: www.turbosupplycenter.com


ANYONE PLEASE HELP!!! STUMPED HERE AND SERIOUSLY NEED HELP!!
Link to comment
Share on other sites

Thank you to Curt Donohue and Michael Marianetti from Prestashop..

I have a solution..

1.
In header.tpl

Found
line 46 var priceDisplayPrecision = '{$priceDisplayPrecision*$currency->decimals};
line 47 var priceDisplayMethod = {$priceDisplay};
line 48 var roundMode = {$roundMode};

and changed to

line 46 var priceDisplayPrecision = '{$priceDisplayPrecision*$currency->decimals}';
line 47 var priceDisplayMethod = '{$priceDisplay}';
line 48 var roundMode = '{$roundMode}';

That fixed most of my issues.. the second part of the fix was I had to restore ajax-cart.js from an earlier version of prestashop..attached is the ajax-cart.js file I used to restore that..

wa la everything is working, tested fine.. with CCC's all on!`!!!

Good luck to anyone else having this issue

ajax-cart.js

Link to comment
Share on other sites

So that's really weird, if this is the default theme, I just checked all versions from 1.4.0.17 to 1.4.3 (including all private releases), and didn't found any problem in the default header.tpl.

Can you please upload your zip file in a ftp and send me the link by mail ?

Link to comment
Share on other sites

  • 2 weeks later...

Ut OH.. Happened AGAIN..

Fatal error: Uncaught exception 'JSMinException' with message 'Unterminated string literal.' in /home/tinao/public_html/tools/js_minify/jsmin.php:94 Stack trace: #0 /home/tinao/public_html/tools/js_minify/jsmin.php(235): JSMin->action(1) #1 /home/tinao/public_html/tools/js_minify/jsmin.php(64): JSMin->min() #2 /home/tinao/public_html/classes/Tools.php(1255): JSMin::minify('// ??// PrestaS...') #3 /home/tinao/public_html/classes/Tools.php(1242): ToolsCore::packJS('// ??// PrestaS...') #4 /home/tinao/public_html/classes/Tools.php(1233): ToolsCore::packJSinHTMLpregCallback(Array) #5 /home/tinao/public_html/config/smarty.config.inc.php(197): ToolsCore::packJSinHTML('/\s*(<script\b[...', Array, '<script type="t...') #6 /home/tinao/public_html/tools/smarty/sysplugins/smarty_internal_filter_handler.php(57): smartyPackJSinHTML('<script type="t...') #7 /home/tinao/public_html/tools/smarty/Smarty.class.php(337): Smarty_Internal_Filter_Handler::runFilter('<script type="t...', Object(Smarty_Internal_Template)) #8 /home/tinao/public_h in /home/tinao/public_html/tools/js_minify/jsmin.php on line 94

Link to comment
Share on other sites

  • 2 months later...

This issue is back.. when ever my preference>preformance settings are set to have these two options selected:

Compress inline JavaScript in HTML after "smarty compile" execution

Minify HTML after "smarty compile" execution.

 

I get the error: Uncaught exception 'JSMinException' with message 'Unterminated string literal.'

Now to comply I have just updated this site to the newest version 1.4.4.1 and still this is happening. This is very strange.

 

Now today I get a new error and the back office is running like molasses when I click on modules: No changes since yesterday:

in /home2/ledlites/public_html/tools/js_minify/jsmin.php:94

Stack trace:

#0 /home2/ledlites/public_html/tools/js_minify/jsmin.php(235): JSMin->action(1)

#1 /home2/ledlites/public_html/tools/js_minify/jsmin.php(64): JSMin->min()

#2 /home2/ledlites/public_html/classes/Tools.php(1364): JSMin::minify('// ??// PrestaS...')

#3 /home2/ledlites/public_html/classes/Tools.php(1351): ToolsCore::packJS('// ??// PrestaS...')

#4 /home2/ledlites/public_html/classes/Tools.php(1335): ToolsCore::packJSinHTMLpregCallback(Array)

#5 /home2/ledlites/public_html/config/smarty.config.inc.php(205): ToolsCore::packJSinHTML('/\s*(<script\b[...', Array, '<script type="t...')

#6 /home2/ledlites/public_html/tools/smarty_v2/Smarty.class.php(1274): smartyPackJSinHTML('<script type="t...')

#7 /home2/ledlites/public_html/tools/smarty_v2/Smarty.class.php(1109): Smarty->fetch('<script type="t...', Object(Smarty))

#8 /home2/ledlites/public_html/controllers/ProductCon in /home2/ledlites/public_html/tools/js_minify/jsmin.php on line 94

[21-Sep-2011 14:13:49] PHP Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home2/ledlites/public_html/modules/jbx_menu/menu_tree.tpl" on line 23 "{foreach from=$item.childrens item=item name=menuTreeChildrens}" item variable 'item' may not be the same variable as at 'from'' in /home2/ledlites/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:431

Stack trace:

#0 /home2/ledlites/public_html/tools/smarty/sysplugins/smarty_internal_compile_foreach.php(40): Smarty_Internal_TemplateCompilerBase->trigger_template_error('item variable '...', 23)

#1 /home2/ledlites/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(284): Smarty_Internal_Compile_Foreach->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NULL, NULL)

#2 /home2/ledlites/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(123): Smarty_Internal_TemplateCompilerBase->callTagCompiler('foreach', Array, Array)

#3 /home2/ledlites/public_html/tools/smarty in /home2/ledlites/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 431

[21-Sep-2011 15:34:23] PHP Fatal error: Uncaught exception 'JSMinException' with message 'Unterminated string literal.' in /home2/ledlites/public_html/tools/js_minify/jsmin.php:94

Stack trace:

#0 /home2/ledlites/public_html/tools/js_minify/jsmin.php(235): JSMin->action(1)

#1 /home2/ledlites/public_html/tools/js_minify/jsmin.php(64): JSMin->min()

#2 /home2/ledlites/public_html/classes/Tools.php(1364): JSMin::minify('// ??// PrestaS...')

#3 /home2/ledlites/public_html/classes/Tools.php(1351): ToolsCore::packJS('// ??// PrestaS...')

#4 /home2/ledlites/public_html/classes/Tools.php(1335): ToolsCore::packJSinHTMLpregCallback(Array)

#5 /home2/ledlites/public_html/config/smarty.config.inc.php(205): ToolsCore::packJSinHTML('/\s*(<script\b[...', Array, '<script type="t...')

#6 /home2/ledlites/public_html/tools/smarty_v2/Smarty.class.php(1274): smartyPackJSinHTML('<script type="t...')

#7 /home2/ledlites/public_html/tools/smarty_v2/Smarty.class.php(1109): Smarty->fetch('<script type="t...', Object(Smarty))

#8 /home2/ledlites/public_html/controllers/ProductCon in /home2/ledlites/public_html/tools/js_minify/jsmin.php on line 94

[21-Sep-2011 15:35:09] PHP Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home2/ledlites/public_html/modules/jbx_menu/menu_tree.tpl" on line 23 "{foreach from=$item.childrens item=item name=menuTreeChildrens}" item variable 'item' may not be the same variable as at 'from'' in /home2/ledlites/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:431

Stack trace:

#0 /home2/ledlites/public_html/tools/smarty/sysplugins/smarty_internal_compile_foreach.php(40): Smarty_Internal_TemplateCompilerBase->trigger_template_error('item variable '...', 23)

#1 /home2/ledlites/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(284): Smarty_Internal_Compile_Foreach->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NULL, NULL)

#2 /home2/ledlites/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(123): Smarty_Internal_TemplateCompilerBase->callTagCompiler('foreach', Array, Array)

#3 /home2/ledlites/public_html/tools/smarty in /home2/ledlites/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 431

[22-Sep-2011 02:54:09] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) in /home2/ledlites/public_html/classes/MySQL.php on line 34

[22-Sep-2011 02:58:41] PHP Warning: Invalid argument supplied for foreach() in /home2/ledlites/public_html/classes/Language.php on line 554

[22-Sep-2011 03:00:22] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections in /home2/ledlites/public_html/classes/MySQL.php on line 34

[22-Sep-2011 03:03:54] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections in /home2/ledlites/public_html/classes/MySQL.php on line 34

Any ideas?

Link to comment
Share on other sites

I also had to turn the "Use Smarty 2 instead of 3" to keep the white screen of death at bay when I did the upgrade. Now I switched my theme to the original one and deleted the one I had created and just modified the CSS and moved around the modules to get the standard theme to look like my old one during the upgrade. Mostly CSS and added all of these modules: freeblock, wcontent, wcontentmaker, jbx menue 2.6.4 by nethercott, carousel 1.2 by Nethercott, block advertising, block videos, jgallery, jcarousel module v1.0 by jan sorgalla/giffelo.com, ogoogleplusone v1.0 by odience.net, googlebase feed products v.0.6.3, google advanced sitemap v.1.0, export products modified v. 0.5., and FirstData by tomerg. Now before I added the first module the site crashed and all the optimization settings were turned off due to errors above except mimnify html. As each were added the site was tested all pages with no problems. I used firebug to check for console errors and got none.

The back office and front office were running fine. Yesterday page speed on FO was 87/100 ok for me and the back office load time was .03 seconds. NO OTHER CHANGES, then today click on modules tab and load speed is now 8.17 and I have these errors above in my log.

 

Everything else is STANDARD!

Link to comment
Share on other sites

OK.. was able to correct the header file, once again was corrupted.. Michael, I think there is something that is adding that error on lines 46-48 of the header file.. the missing ' marks. That fixed some of the issues and they seem to be gone now. About 7 errors are now gone too.

 

Still have these three errors in the firebug console:

jQuery ('ul.sf-menue").superfish is not a function (probably from the jbx menue conflicting jquery versions with the carousel.

Then

var taxRate = 7';

(not sure what this error is??)

And..

oosHookJsCodeFunctions is not defined

oosHookJsCodeFunctions.push('oosHookJsCodeMailAlert');

I think this means my mail alert module is not compatible with my new version 1.4.4.1??? Don't know.

 

Thanks, Tina

Link to comment
Share on other sites

Very strange, some how during the upgrade the modules/mail alerts file must have gotten corrupted. most of the errors above were all fixed by just reinstalling that module from the back up folder for that module "mail alerts"

 

I now only have the superfish error which I know is because of the conflict with the JBX menu and the Carousel module. so I am happy camper.. everything is working again. Michael, again, thanks for your help in the past.. guess your pretty busy but as usual I tinkered enough and fixed it. I know you would have piped in eventually to help. :)

So, Thanks anyway!

Link to comment
Share on other sites

  • 1 year later...

Fatal error

: Uncaught exception 'JSMinException' with message 'Unterminated string literal.' in /home/mcshop/public_html/tools/js_minify/jsmin.php:94 Stack trace: #0 /home/mcshop/public_html/tools/js_minify/jsmin.php(235): JSMin->action(1) #1 /home/mcshop/public_html/tools/js_minify/jsmin.php(64): JSMin->min() #2 /home/mcshop/public_html/classes/Tools.php(1436): JSMin::minify('// ???var order...') #3 /home/mcshop/public_html/classes/Tools.php(1423): ToolsCore::packJS('// ???var order...') #4 /home/mcshop/public_html/classes/Tools.php(1406): ToolsCore::packJSinHTMLpregCallback(Array) #5 /home/mcshop/public_html/config/smarty.config.inc.php(203): ToolsCore::packJSinHTML('/\s*(<script\b[...', Array, '<script type="t...') #6 /home/mcshop/public_html/tools/smarty/sysplugins/smarty_internal_filter_handler.php(57): smartyPackJSinHTML('<script type="t...') #7 /home/mcshop/public_html/tools/smarty/Smarty.class.php(337): Smarty_Internal_Filter_Handler::runFilter('<script type="t...', Object(Smarty_Internal_Template)) #8 /home/mcsho in

/home/mcshop/public_html/tools/js_minify/jsmin.php

on line

94

 

I have this error in my site when users click on checkout button but this error does not display for all users.Plz Reply

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 7 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...