I've got a template with PHP enabled and set to On Output
, and any PHP at all is getting commented and printed, without being processed, in the HTML.
Template (simplified):
{embed=".header"}
{exp:stash:set name="some_value" parse_conditionals="yes" parse_tags="yes"}{if 'something' == 'somethingelse'}y{/if}{/exp:stash:set}
<div>
<?php echo 'foo'; ?>
</div>
{embed=".footer"}
Output:
<html>
<head>
<title>Oh the Confusion</title>
</head>
<body>
<div>
<!--<?php echo 'foo'; ?>-->
</div>
</body>
</html>
Other templates use Stash and conditionals, many use PHP, and this is the only one that combines both Stash (parsing conditionals) and embedded PHP. Caching is not an issue here. This looks like a friendly, intentional thing since the PHP obviously isn't plainly visible to the viewer, but why is this happening?
ExpressionEngine 2.5.5 with a bajillion addons that I can list if it's helpful.
Note: I've simplified my question after figuring out how to ask it better with the help of Lisa Wess. This one seems brief and cheeky because I'll be answering it myself for posterity.
{if member_group == 1}
it has this problem. Removing the conditional somehow makes it okay again. Does that make any sense? (I've tried variations like{if "{member_group}" == 1}
etc to no avail.)