EE 2.10.1 Stash 2.6.5

I'm trying to set up some shortcodes using Stash on a rebuild of my site where I formally was using MX Jumper to do the same thing.

The code works fine except that the last instance of the shortcode always outputs home on the front end inexplicably

My code is where {code_sample} is a grid field:

    //Stashing code blocks to inject into blog_copy

    {exp:stash:set name="code_block_{code_sample:count}" type="snippet"}



    //End Stashing code blocks

Then further down the template:

{exp:stash:parse process="end"}

If there is more than one code block then the final code block always renders as home.

Any thoughts?


Template debugging shows this as the final output, which is correct but still on the front end it displays "home"

(0.195359 / 8.31MB) Stash: SET code_block_9 to value {exp:ee_syntax:filter} <pre lang="php" line="3257"> $field_id = $this->get_field_id($field_name); ee()->api_channel_fields->apply('_init', array(array( 'row' => $this->entry, 'content_id' => $this->entry('entry_id'), 'field_id' => $field_id ))); </pre> {/exp:ee_syntax:filter}

Also if I put this code in the template without stash all grid rows are output correctly





-----end update-------

-----update 2-------

Working with a new template with nothing in it but the layout tag and channel entries I have determined that this stash code does not play well when passing variables through the layout tag like this:

{layout="site/_layout" body_id="home"}


{layout:set name="body_id"}blog{/layout:set}

Using either of those results in the final code block outputting whatever is being passed through in the layout tag. Changing the passed variable name doesn't fix this issue either. Not sure if this is a Stash bug or an EE bug or both...

-----end update 2-------

1 Answer 1


This turned out to be a bug in the Template class:


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.