Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

Trouble using meteor emails inside another package #28

Open
mcoenca opened this issue Jun 22, 2015 · 10 comments
Open

Trouble using meteor emails inside another package #28

mcoenca opened this issue Jun 22, 2015 · 10 comments

Comments

@mcoenca
Copy link
Contributor

mcoenca commented Jun 22, 2015

I think it is linked to the fact that you are not using Assets.getText(), and that i can't "push" files in the private/ directory from a package.js api.addFiles().

I get "could not get template MyTemplate Error 500" :(

If somebody has a workaround, lmk ! Thanks

@mcoenca
Copy link
Contributor Author

mcoenca commented Jun 22, 2015

I am working on something, i have it working in dev. Will test in production and will submit pull request as soon as it is ready

@johanbrook
Copy link
Contributor

Thanks!

@niranjans
Copy link

@mcoenca Did you manage to work around this? I'm stuck having that same "Could not find template.." message.

@mcoenca
Copy link
Contributor Author

mcoenca commented Jan 25, 2016

@niranjans
Yes I have something here, mcoenca@ab4dea1 , that works when you pass the underscore folder name of your package that requires lookback:emails (see .meteor/local/isopacks)

NotifsEmailTemplates.newQuestAnswer = { path: 'lib/newQuestAnswer.html', packageName: 'bridges_notifications', route:{ path: '/...

I have not merged or submitted pull request though, I am way behind the upstream master ^^ Will look into that

@mcoenca
Copy link
Contributor Author

mcoenca commented Jan 25, 2016

@niranjans Ok I've just checked. Compared to upstream, there have been breaking changes in code organisation around my commits, so I can't submit my pull request like this. You can either use my version (which lacks some of the newest features, and thus you need to use the old documentation on my branch), or try to look into my commit and adapt the concepts into your own fork from the new version. I don't have time right now to look at how to make the changes fit into the current upstream master Sorry !! :(

@niranjans
Copy link

@mcoenca no problem. I can look into your version and it would be a good start. I appreciate your help! :)

@adamgins
Copy link

adamgins commented Feb 1, 2016

HI, looking to leverage this too so I can use my email code/HTML into two apps. Just wanted to check if it had got any further/closer to release, please?

@johanbrook
Copy link
Contributor

Is this still due to packages can't use Assets.getText() to get hold of stuff in the private directory?

@mcoenca
Copy link
Contributor Author

mcoenca commented Feb 1, 2016

Not sure anymore if my comment was right... you're reading files with fs anyway. I am looking if I can submit a valid PR tonight

@mcoenca
Copy link
Contributor Author

mcoenca commented Feb 1, 2016

Ok i almost have it, unsure about it working in all cases, needs testing, but less had changed than i thought so it should work. I've seen Meteor docs have been updated regarding Assets.getText() and package access, but as you are not using it to read files, I didn't want to break cohesion so I kept my old approach. #51

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants