Resetting the user invitation email template does not reset it to the actual default.
Steps to repro:
- Set up and email provider so that template modifications work.
- Change the email template for user invitation.
- Save this change.
- Press reset and save.
The templates go from looking solid:
To barebones and missing proper variables:
Additionally, it looks like the template it “resets” to has some HTML errors:
A few fixes come to mind-
- Have a repository with all actual defaults available to users
- Properly reset to what the actual default template is
- Expose a DELETE endpoint for the email templates. When the template is undefined (ie never customized and saved), this isn’t an issue.
Right now our workaround is just to be careful to never customize and save the templates, because once this is done, it can’t be undone.
Very similar to: Reset Default Email Template
However, this was solved because someone uploaded all templates so you could just copy them over. This is no longer the case with the updated default templates.
Hi @linden.haynes
Welcome back to the Auth0 Community!
I am sorry about the delayed response to your inquiry, I am still investigating and testing this issue out on my end and I will come back with an update as soon as possible!
If you have anything else to add, please leave a reply on the post!
Kind Regards,
Nik
Hi again @linden.haynes
I am sorry about the late reply to your inquiry.
It appears that the issue in resetting the template is caused by the liquid variables inside the template being replaced by {{ resource_name | escape }}
in the body elements that appear to be missing. You would need to replace those variables with something appropriate available in the list of common variables mentioned in our documentation.
As for the HTML error, if you simply remove them, the template should work just fine, however, I understand that the default template should not include them at all.
If you have any other questions, let me know!
Kind Regards,
Nik
That makes sense, but is there not some other way to reset the templates in that case? The reset button is effectively incorrect as it works, as it doesn’t actually reset to the default. Even just linking to plaintext files with the default templates would be useful.
I completely understand that.
I will reach out internally regarding the templates reset function and regarding making the templates available through an article!
Kind regards,
Nik