Need some help with {{resetLink}} in Email Template

If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:

I’m currently building a site with www.themagicresource.com as the site, and admin.themagicresource.com for the Ghost CMS.

I’m on version 3.11.0.

In my config I have:

"url": "https://www.themagicresource.com"

and I’ve tried

"admin-url": "https://admin.themagicresource.com", "admin": "https://admin.themagicresource.com"

When I send an invite to new users, or a reset password, however, {{resetLink}} uses the url and not the admin or admin-url. Everything else is working fine, but this is a bit of a problem for me.

Am I doing something wrong with my configuration that I’ve missed? I also plan on changing my email templates to customize them, is there another variable to use to just get the token for reset?

I’m not sure how to solve this, and would like to keep things separated like they are now.

It looks like you’re using Ghost as a headless CMS alongside Nest.js, is that right? Currently the Members feature is still in beta and isn’t fully compatible within a headless stack, see more here:
Membership with JAMstack

I’m not really trying to build out members or anything - just trying to invite new authors or resetting a password. I understand moving things along, but this seems like something that needs attention sooner rather than later, as having authors on a blog site would be somewhat important?

I appreciate the information - but what do I do now? Is there no way to resolve this currently?

I can find the section I’m looking for in the code - If I can figure out how to get the variable to use admin url when it exists, that should solve everything. I’ve not looked at the codebase in some time though.

Although this makes it seem as though it should be working https://github.com/TryGhost/Ghost/blob/abda6e63383633e146a330ec96570bb55d9c0236/core/server/api/v2/invites.js#L125

I think when I set up the config I did something incorrectly with the admin url. I updated it to the following:

{
  // other config
  "admin": {
    "url": "https://admin.themagicresource.com"
  }
}

Works perfectly now. Sorry for the trouble - just missed the config somewhere.

1 Like