Have simple use of stash in a template. Worked fine in EE2, but with EE3 after upgrade stash is scrambling the content.

Here is an example of the kind of issue. Example short-hand stash-set / stash-get syntax (but using long hand doesn't fix)

Value stored via this type of tag:

{exp:stash:value parse="yes"}test{/exp:stash:value}

And retrieved via this kind of tag:

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

In EE2 the second tag faithfully provides the required value (i.e. 'test'). In EE3 (for the test string 'test') I'm seeing this:

{cf517f46e6ed2e6b3d3f7e67d457f36f1602617362}

Any ideas how I can fix this?

  • 1
    EE2 and EE3 third party add-ons (expect for plugins mostly) are not compatible. Is there an EE3 version of Stash (or has it been explicitly stated it's current state is compatible with EE3)? – jrothafer Dec 10 '16 at 1:03
  • Yep - this is the EE3 version of Stash (3.0.3 from Devot.ee) - but for good measure I've also tried the version available from the croxton git page (3.0.4) - which is showing up as installed OK in the EE3 Add-on panel. – jcogs.eecms Dec 10 '16 at 12:10
up vote 1 down vote accepted

ExpressionEngine (all versions) will choke if you use the same tag as a single and as a pair in the same template:

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

{exp:stash:test}Test value{/exp:stash:test}

It could be that this worked for you in EE2 but not in EE3 because of subtle changes to the parser, but it would have been a fluke that it seemed to work at all.

This will work:

{exp:stash:get name="test" process="end"}

{exp:stash:test}Test value{/exp:stash:test}

Or:

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

{exp:stash:set name="test"}Test value{/exp:stash:set}

Or:

{exp:stash:get name="test" process="end"}

{exp:stash:set name="test"}Test value{/exp:stash:set}
  • OK - helpful I guess. Does this mean that the entry in Stash/Wiki is wrong and / or needs revision? The entry on this page github.com/croxton/Stash/wiki/Short-tag-syntax suggests that the format I was using (short syntax tag pair to set, short syntax tag to get) is legitimate. – jcogs.eecms Dec 12 '16 at 14:18
  • 1
    Cheers I've updated the wiki to explain this limitation with the short tag syntax. – Mark Croxton Dec 13 '16 at 10:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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