lexik/LexikMailerBundle

Template is not defined error

Closed this issue · 4 comments

When attempting to preview emails I get errors similar to the following:

Template "content_a87d51ee0ec089fa01a913c06a5559e5" is not defined ().

I see the "setEmailTemplates" method passing "html_content_" and "text_content_" items, but no "content_" to the "isFresh" method in the EmailLoader class.

I do not see where "content_" is being requested from. Am I doing something wrong?

You are not doing something wrong, there was a little mistake in the previewAction. This d63b6fa should fix the error.

Thanks! That resolved the error that I was seeing.

One other thing though is that the preview does not render the content block of the layout and only displays the email body. I can create a new issue for that if you'd like, but I thought I'd mention it here.

Your work is appreciated.

Yes the preview does not render the layout. This is a choice from us to do like that as the preview action is available from the email template form, but maybe this feature can be improved.

Okay, thank you then, I'll close this issue.