In my stash partial, I have:
{!-- Custom Sidebar? --}
{if "{exp:stash:get name='custom_sidebar_text'}"}
<section class="container">
{if "{exp:stash:get name='custom_sidebar_title'}"}
<h3>
{exp:stash:get name='custom_sidebar_title'}
</h3>
{/if}
{exp:stash:get name='custom_sidebar_text' random}
</section>
{/if}
{!-- /Custom Sidebar --}
In my template I have this:
{embed="layouts/.landing_page"}
{exp:channel:entries}
{exp:stash:set parse_tags="yes" parse_conditionals="yes"}
{!-- Several other stash variables --}
{stash:custom_sidebar_title}{custom_sidebar_title}{/stash:custom_sidebar_title}
{stash:custom_sidebar_text}{custom_sidebar_text}{/stash:custom_sidebar_text}
{/exp:stash:set}
{/exp:channel:entries}
I’m getting a warning saying:
A PHP Error was encountered
Severity: User Warning
Message: Invalid EE
Conditional Variable: {if "
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /Users/agarzola/git/wfgc/system/codeigniter/system/core/Exceptions.php:170)
Filename: core/Common.php
Line Number: 412
If I remove the outermost conditional tags in the partial ({if "{exp:stash:get name='custom_sidebar_text'}"}
and '{/if}'), the markup is rendered perfectly, with the stash variables parsed as expected.
edited to add: This only happens when the custom_sidebar_text
field contains a link (generated via Wygwam in this case). Take away the link on the edit entry form, save the page, and the error goes away.