NEW INFO OK, I found that the error was being thrown by a custom exception built into expression engine that will do partial matches on variable names if it doesn't find the original one.
From libraries/Functions.php:
// There is a partial variable match being done
// because they are doing something like segment_11
// when there is no such variable but there is a segment_1
// echo $x[$j]."\n<br />\n";
trigger_error('Invalid EE Conditional Variable: '.$matches[0][$i], E_USER_WARNING);
This code is part of a loop, essentially. We do have a variable called deal
, which in certain cases evaluates to N (the element that's being processed by the template is not a deal). The error is only being thrown in cases where there is no deal_original_price
(i.e. on rows that are not deals). I don't know why it's even trying to evaluate that, though, because the entire call is inside another conditional that only runs if deal
is Y.
{if deal == "Y" AND coupon == "N"}
<tr data-deal_id="{deal_id}">
<td class="productPrice" style="vertical-align: top;">${deal_total}<br />
{if deal_original_price && deal_original_price != "" && deal_original_price <> deal_total}
<span class="originalDealPrice">${deal_original_price}</span><br /><span id="modal_change">Why is there a price difference?</span>
{if:else}
<span id="modal_same">Pricing Terms & Conditions</span>
{/if}
</td>
</tr>
{/if}
Any ideas?
=====================================================================
I have the following html with embedded ee variable:
<td class="productPrice">${deal_total}<br />{if deal_original_price != ""}<span class="originalDealPrice">${deal_original_price}</span><br /><span class="removeItem"></span>{/if}</td>
It works, to some extent - it is displaying the correct value for deal_original_price
. But when I check my error logs, I see this:
[06-May-2013 10:50:12] PHP User Warning: Invalid EE Conditional Variable: {if "N"original"$1.50" != ""} in C:\gitRepo\qo5phi\system\expressionengine\libraries\Functions.php on line 2843
(Here's what it actually looks like; SE is interpreting the ascii code for the dollar sign.)
I'm new to EE; can anyone tell me what this means? (I realize it's just a warning, not a fatal error, but we're trying to clean up our code and don't want to do anything that throws warnings.)
ETA
[06-May-2013 11:07:47] PHP Parse error: syntax error, unexpected T_STRING in C:\gitRepo\qo5phi\system\expressionengine\libraries\Functions.php(680) : eval()'d code on line 194
[06-May-2013 11:07:47] PHP Stack trace:
[06-May-2013 11:07:47] PHP 1. {main}() C:\gitRepo\qo5phi\index.php:0
[06-May-2013 11:07:47] PHP 2. require_once() C:\gitRepo\qo5phi\index.php:188
[06-May-2013 11:07:47] PHP 3. call_user_func_array() C:\gitRepo\qo5phi\system\codeigniter\system\core\CodeIgniter.php:311
[06-May-2013 11:07:47] PHP 4. EE->index() C:\gitRepo\qo5phi\system\codeigniter\system\core\CodeIgniter.php:311
[06-May-2013 11:07:47] PHP 5. EE_Core->generate_page() C:\gitRepo\qo5phi\system\expressionengine\controllers\ee.php:68
[06-May-2013 11:07:47] PHP 6. EE_Template->run_template_engine() C:\gitRepo\qo5phi\system\expressionengine\libraries\Core.php:643
[06-May-2013 11:07:47] PHP 7. EE_Template->fetch_and_parse() C:\gitRepo\qo5phi\system\expressionengine\libraries\Template.php:179
[06-May-2013 11:07:47] PHP 8. EE_Template->parse() C:\gitRepo\qo5phi\system\expressionengine\libraries\Template.php:231
[06-May-2013 11:07:47] PHP 9. EE_Template->advanced_conditionals() C:\gitRepo\qo5phi\system\expressionengine\libraries\Template.php:488
[06-May-2013 11:07:47] PHP 10. EE_Template->parse_template_php() C:\gitRepo\qo5phi\system\expressionengine\libraries\Template.php:3153
[06-May-2013 11:07:47] PHP 11. EE_Functions->evaluate() C:\gitRepo\qo5phi\system\expressionengine\libraries\Template.php:1579