When I use the default field of {$Username} in emails for password resets or new issue announcements, the field does NOT populate.
Per (pkp/pkp-lib#9169), it states that we should use {$recipientUsername} which we tested on the password reset email and it does NOT work either.
Now, I see someone has chimed in with this patch..
An I am confused as to which course to take. The patch here and on 9169 points to the login handler.. I just want the USERNAME to populate on outbound emails. Please clarify. Thanks.
Support for the {$recipientUsername} variable was added with #9169, which was implemented in OJS 3.3.0-16 – so it won’t work in OJS 3.3.0-14. (You can see where it was first implemented by looking at the Milestone on the sidebar.)
I don’t think there ever was a {$Username} email variable – note that these are case sensitive. But I don’t think {$username} would work either. Did you see that documented somewhere?
Regards,
Alec Smecher
Public Knowledge Project Team
I guess my email response did not come through to the forum!
Does your note mean that we need to be on 3.3.0-16 to apply the patch or that the patch was added in 3.3.0-16? Does that mean that we can add the patch to 3.3.0-14 to resolve the issue?
{$Username} was in the email template for multiple emails across all our journals.
Is there a list of valid email template fields that work? If so, could you point me to it? Thank you!
You should be able to apply the patch to 3.3.0-14, but we haven’t tested that and can’t provide support for it. A much better plan would be to upgrade to the latest 3.3.0-x release – you’ll get other fixes too.
I don’t see {$Username} anywhere in the codebase; I think it must’ve been added manually or something.
The available email variables will depend on what template you’re working with. You can check what tags are available by composing that email, then using the tool in the compose box to get a list. This gets much more complete in OJS/OMP/OPS 3.4.0 and later, when we rewrote the email tools.
Regards,
Alec Smecher
Public Knowledge Project Team
We have updated to 3.3.0.20 and the Your username: {$recipientUsername} works! Yeah!
WHERE is the comprehensive list of fields that can be populated in an email template? I searched the web and the forum. Many say the list does not exist. Some suggest it is being created. Appreciate anyone who can point me to this list or pieces of lists. Thank you, radjr
I’m not aware of a full list of variables available to 3.3.0-x email templates. As I mentioned above, starting with 3.4.0 there is a full list built into the system. We’re not likely to do anything further for OJS 3.3.0-x.
Regards,
Alec Smecher
Public Knowledge Project Team