-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
email templates path not working #22473
Comments
hmm, i have forked the directus repo to try to reproduce the issue and I haven't succeeded, ie template being targetted fine. |
ah! I figured it out. Now that the templates directory is not inside the extensions directory, it will need it's own docker volume ... facepalm ;) |
dude how did you solve it? we have the same issue. Cant read access the custom-template.liquid |
we tried ./templates and extensions/templates and restart the docker |
hey! in your docker-compose.yml, your directus container must have this ( ie add the templates volume): |
big thanks for your reply! And you added the folder templates yourself and created a base.liquid etc? |
pleasure! yes i did |
can you send me a structure of your base.liquid? |
i get this error |
hmm... you have rebuilt the docker-compose? |
I'm not useing a base template, but thats not relevant really. Are you on the latest version? 10.11.0? |
working now! |
AH yes, forgot about that, although i would have thought it would default . Anyhow... Cool man glad its working. Always good to know I'm not the only one tearing my hair out about these things lol |
bro the docu is so bad about this... i am a big fan of directus but this stuff is really not fair to configure... actually so simple but if you dont know you dont know... |
I know, the docs are behind the latest version in many places. But i can imagine it's really hard for the guys to keep the docs up to date along with all the issues. I did a docs PR for the added templates volume in the example docker-compose file, and it was merged in. Hoping to find time to do more docs PRs |
good job mate! your are right |
Describe the Bug
This seems like a really simple issue but it has me stuck. I have an endpoint extension that sends an email and it can't seem to read the template files. I am on the latest version and I did see this in breaking changes:
I have done exactly this, trying the ./templates option and also trying setting a new location in the .env variable.
Error response when the endpoint receives a request :
directus | DirectusError: Invalid payload. Template "enquiry" doesn't exist.
directus | at MailService.renderTemplate (file:///directus/node_modules/.pnpm/@directus+api@file+api_@aws-sdk+client-sso-oidc@3.569.0_@aws-sdk+client-sts@3.569.0_@types+no_odrjvwlnfqlgyznoalys6xyvne/node_modules/@directus/api/dist/services/mail/index.js:65:19)
directus | at async MailService.send (file:///directus/node_modules/.pnpm/@directus+api@file+api_@aws-sdk+client-sso-oidc@3.569.0_@aws-sdk+client-sts@3.569.0_@types+no_odrjvwlnfqlgyznoalys6xyvne/node_modules/@directus/api/dist/services/mail/index.js:48:20)
To Reproduce
use the mailService.send method , passing in options including template.name where name is an existing .liquid filename inside ./templates
Directus Version
10.11.0
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered: