0

Have edited this question in light of further information subsequent to the initial question being posted...

Have Stash 3.0.4 running on EE 3.4.6.

Have migrated an EE2 site that is working fine, to EE3.

Several of the templates are simply a one-line {stash:embed} tag which redirects to one of several shared templates. The redirect templates look like this:

{stash:embed:_resources-cat-index process="start"}

This redirection approach works fine in EE2, but in EE3 the embeds are failing: rather than running the template defined in the embed, an error is displayed of this form:

The following errors were encountered

Stash: the file "/var/sites/e/ee3.2gc.org/system/expressionengine/templates/default_site/stash_templates.group/_wwd-index.html" was not found.

Because the error occurs before a template is loaded, there is no debugging information showing beyond this error message.

I have tried removing all the one other extension that uses the template_fetch_template method but it makes no difference.

Any ideas what might be a solution?

0

Make sure you have defined a list of allowed extensions for embeds in your config, and that your embed is using one of them, e.g.:

$config['stash_file_extensions'] = array('html', 'md', 'css', 'js', 'rss', 'xml');

Make sure that you have defined the path to your stash templates:

$config['stash_file_basepath'] = "/path/to/my/stash/templates/"

If you have checked these and it still isn't working, there are a few possibilities:

  • Verify that the stash_fetch_template and template_fetch_template extensions are installed. If not, delete and reinstall Stash.

  • Check which other add-ons use the template_fetch_template extension hook. You may find that disabling them causes your embed to work, in which case you should contact the author of the add-on responsible and ask them to check the value of the ee()->extensions->last_call property when the hook is triggered, and to return a value from their extension.

  • You may have other tags throwing errors which would interrupt the template parser and stop it completing. You can either use the template debugger to see which tag is processed last and/or remove other tags from the template until the embed works, to figure out which tag(s) are the culprit.

| improve this answer | |
  • As per initial post the embeds are working fine when used within EE2. The file extension list is defined and basepath set (implied by embeds working in EE2, but just for clarification). Not sure where in EE3 I'd check on the 'fetch' templates being installed - could you clarify this please? Thx. – JCOGS Design Dec 12 '16 at 15:35
  • Look at the exp_extensions table in your database and see which add-ons have template_fetch_template listed in the method column. To temporarily disable the add-on extension, set the value in the enabled column to n. – Mark Croxton Dec 13 '16 at 10:53
0

Found the answer: very annoying in the end. Lack of a trailing slash in the $config['stash_file_basepath'] setting... grr!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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