I have this code. Inside the stash tag pair, there is a loop that gets a list of author_ids based on certain conditions

{exp:stash:set name="author_ids" trim="yes" parse_tags="yes" parse_vars="yes"}
    {!-- TODO: Loop --}

I outputted the code below for debugging purposes

<h2>exp:stash:author_ids - [{exp:stash:author_ids}]</h2>
<h2>{exp:stash:not_empty name="author_ids"}</h2>
<h2>{exp:stash:is_empty name="author_ids"}</h2>

The interesting thing is that this is the output for when I have a list of author_ids...

exp:stash:author_ids - [175|176|]

...and this is the output when there wasn't any author id that was set

exp:stash:author_ids - []

This is strange.

In both cases, why does the empty functions of stash return the same result for both cases when its apparent that in one case, the value is empty and the other is not empty?

1 Answer 1


I've tested this in the latest version of Stash on EE 2.8.1 and can't replicate your problem - it works fine for me.

Is there anything else in your template that could be causing it? Are you using the most up to date version?

  • The code above is before a code that embeds. The reason I want to do a conditional is that I want to pass certain embed variables based if a conditiona is true or not. I am using Stash 2.5.3. Jun 30, 2014 at 22:30
  • 1
    ah right, you're using conditionals? In that case you'll need to use parse="yes" (which is a shortcut for parse_tags="yes" parse_conditionals="yes" parse_vars="yes") Jul 1, 2014 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.