|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ryanmc Smarty Rookie
Joined: 22 Feb 2013 Posts: 20
|
Posted: Fri May 17, 2013 7:13 pm Post subject: Smarty 3 SmartyCompilerException on single quote |
|
|
I am upgrading from smarty 2 to smarty 3 and I am running into a strange problem. It seems like Smarty 3 does not like single quotes.
For example I have this line of javascript wrapped with {literal}
Code: |
var apPayeesDropdownValues = $("#ap_payees_dropdown").val().split('_');
|
and I get this error
Code: |
[17-May-2013 12:58:09 America/Denver] PHP Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "\Interfaces\Templates\accounting\invoices\create_invoice.tpl" on line 478 "var apPayeesDropdownValues = $("#ap_payees_dropdown").val().split('_');" - Unexpected "'} |
If I change the single quotes to double quotes then the error goes away for this line and shows up for the next line that has single quotes.
Why would smarty be freaking out about single quotes in javascript when I am using {literal}? |
|
Back to top |
|
ryanmc Smarty Rookie
Joined: 22 Feb 2013 Posts: 20
|
Posted: Fri May 17, 2013 8:10 pm Post subject: |
|
|
Nevermind I found the problem. Their was an extra single quote further up in the code, once I removed it the error went away. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|