Open soullivaneuh opened 3 years ago
Hmmm. Can you cut and paste the entire template with Id 352f5059-d5a2-4a6b-b737-eafa6bdc5c9f
?
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
}
body {
font-family: Inter, sans-serif;
text-align: center;
}
p {
margin: 15px 0;
}
.container {
max-width: 700px;
margin: auto;
}
.logo {
max-width: 150px;
margin: 15px 0;
}
.nexy-gradient {
background: rgb(72,211,170);
background: linear-gradient(90deg, rgba(72,211,170,1) 0%, rgba(95,74,227,1) 100%);
width: 100%;
height: 5px;
}
/* Use to space different mail content parts. */
.content {
margin: 50px 0;
}
.footer {
margin: 15px 0;
}
.footer > p {
margin: 0;
}
</style>
</head>
<body>
<div class="container">
<div>
<img
src="https://design.company.dev/img/logo/text.png"
alt="Company Logo"
class="logo"
/>
</div>
<div class="nexy-gradient"></div>
<div class="content">
<p>
Hello,
</p>
</div>
<div class="content">
<p>
You are now part of the Company hosting users: we warmly thank you
for your trust and are very happy to count you among our customers.
</p>
<p>
We have created your Company account <b>${user.email}.</b>
</p>
<p>
<b>
Please click on the link below to finalize its activation:
</b>
<br />
<a href="https://connect.company.com/password/change/${changePasswordId}?tenantId=${user.tenantId}">
https://connect.company.com/password/change/${changePasswordId}?tenantId=${user.tenantId}
</a>
</p>
<p>
<b>
Need help ?
</b>
<br />
You can find all of our documentation here:
<a href="https://docs.company.com/">https://docs.company.com/</a>
</p>
</div>
<div class="content">
<p>
You have any questions? Do not hesitate to send us an email at support@company.com
</p>
<p>
See you soon,
The Company team
</p>
</div>
<div class="nexy-gradient"></div>
<div class="footer">
<p>
<b>Company</b> // Bla bla
</p>
<p>
03 00 00 00 00
- contact@company.com
- <a href="https://www.company.com/">www.company.com</a>
</p>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
}
body {
font-family: Inter, sans-serif;
text-align: center;
}
p {
margin: 15px 0;
}
.container {
max-width: 700px;
margin: auto;
}
.logo {
max-width: 150px;
margin: 15px 0;
}
.nexy-gradient {
background: rgb(72,211,170);
background: linear-gradient(90deg, rgba(72,211,170,1) 0%, rgba(95,74,227,1) 100%);
width: 100%;
height: 5px;
}
/* Use to space different mail content parts. */
.content {
margin: 50px 0;
}
.footer {
margin: 15px 0;
}
.footer > p {
margin: 0;
}
</style>
</head>
<body>
<div class="container">
<div>
<img
src="https://design.company.dev/img/logo/text.png"
alt="Company Logo"
class="logo"
/>
</div>
<div class="nexy-gradient"></div>
<div class="content">
<p>
Bonjour,
</p>
</div>
<div class="content">
<p>
Vous faites maintenant partie des utilisateurs de Company : nous vous remercions
chaleureusement pour votre confiance et sommes très heureux de vous compter parmi nos clients.
</p>
<p>
Votre compte Company <b>${user.email}</b> a été créé par nos soins.
</p>
<p>
<b>
Pour finaliser son activation cliquez ici :
</b>
<br />
<a href="https://connect.company.com/password/change/${changePasswordId}?tenantId=${user.tenantId}">
https://connect.company.com/password/change/${changePasswordId}?tenantId=${user.tenantId}
</a>
</p>
</div>
<div class="content">
<p>
<b>
Besoin d’aide ?
</b>
<br />
Retrouvez toute notre doc par ici :
<a href="https://docs.company.com/">https://docs.company.com/</a>
</p>
<p>
Vous avez des questions ? N’hésitez pas à nous envoyer un mail à support@company.com
</p>
<p>
À très vite,
L’équipe Company
</p>
</div>
<div class="nexy-gradient"></div>
<div class="footer">
<p>
<b>Company</b> // Bla bla bla
</p>
<p>
03 00 00 00 00
- contact@company.com
- <a href="https://www.company.com/">www.company.com</a>
</p>
</div>
</div>
</body>
</html>
Hello,
You are now part of the Company hosting users: we warmly thank you
for your trust and are very happy to count you among our customers.
We have created your Company account ${user.email}.
Please click on the link below to finalize its activation:
https://connect.company.com/password/change/${changePasswordId}?tenantId=${user.tenantId}
Need help ?
You can find all of our documentation here: https://docs.company.com/
You have any questions? Do not hesitate to send us an email at support@company.com
See you soon,
The Company team
Company // Bla bla bla
03 00 00 00 00 - contact@company.com - www.company.com
Bonjour,
Vous faites maintenant partie des utilisateurs de Company : nous vous remercions
chaleureusement pour votre confiance et sommes très heureux de vous compter parmi nos clients.
Votre compte Company ${user.email} a été créé par nos soins.
Pour finaliser son activation cliquez ici :
https://connect.company.com/password/change/${changePasswordId}?tenantId=${user.tenantId}
Besoin d’aide ?
Retrouvez toute notre doc par ici : https://docs.company.com/
Vous avez des questions ? N’hésitez pas à nous envoyer un mail à support@company.com
À très vite,
L’équipe Company
Company // Bla bla bla
03 00 00 00 00 - contact@company.com - www.company.com
@mooreds Do you have any clue about this issue? Thanks!
Hmmm. I don't have any ideas. Looks like your template contain the changePasswordId
which is a valid variable here: https://fusionauth.io/docs/v1/tech/themes/template-variables/#oauth-change-password-form
Is there anything in the event log? Sometimes useful info shows up there.
Additional steps you could take:
changePasswordId
is used in any other template for which it isn't definedchangePasswordId
in the nullsafe operator ( ${changePasswordId!"missingchangepasswordid"}
) and see if you get a different error message.I am unfortunately too slammed to try to replicate right now, but can put it on the (somewhat long) list.
@mooreds Going back to the issue.
First, please know we still have the same error under v1.40.0
. We recently updated to v1.40.2
, we will monitor that.
provide a docker file we can use to replicate locally
That will be quite difficult, giving you only the Dockerfile
won't help at is needs several file for the setup script and template generation. However, we may invite you to our private project so you should be able to take a look.
Also, please note this error does happen only for some of the account creation and I didn't yet find the reproducible context, so it may not help.
see if
changePasswordId
is used in any other template for which it isn't defined
The changePasswordId
if used by the following template we override:
They are expected and used the same way. However, I am not sure about the question as the error come clearly from the setup_password
template.
wrap any calls to changePasswordId in the nullsafe operator ( ${changePasswordId!"missingchangepasswordid"} ) and see if you get a different error message.
Well, I won't do that for an obvious reason: This will lead to the error being gone but broken URLs would be silenced dispatch across our customer, which is a not acceptable situation for us.
Trigger a send of the Setup Password email
Are you using the Send API, or beginning the workflow by using the Change Password API?
Template render crash on Setup password tenant email sendinf
Description
We have numerous logs with template crashes on the template rendering
Affects versions
1.30.1
Steps to reproduce
Setup Password
emailExpected behavior
Sent email without error.
Screenshots
Platform
(Please complete the following information)
Community guidelines
All issues filed in this repository must abide by the FusionAuth community guidelines.
Additional context