Local Ghost 3.0 - subscribing does not work

As the title says, it does not work for me. I just downloaded the new v3.0 and got it running to update my theme with custom additions from 2.0.

But I’m unable to enter my e-mail, as it just gives my this error (after 30 seconds of thinking):

3 Likes

Is that error message hardcoded in your theme? Or coming back from the server?

Do you have a local mail config set up? If not you’ll either have to setup a local mail config OR check your server logs to see that we output the contents of the email when running locally so you can test/develop!

It’s just a simple div in the new theme Lyra for the 3.0 launch:

<div class="message-error">
    Please enter a valid email address!
</div>

This is for the newly launched 3.0, where you can have members use the subscribe button on your page.

In 2.0, I could use the subscribe feature with no problems, no setup. So I’m not exactly sure how this will be able to work locally?

Fabien has explained how it is possible to use this locally. You have two options:

  1. setup working mail config
  2. (easier for dev) use the server logs to view the generated email links

To explain the full steps for anyone reading this:

On Mac OS, you can either use ghost install local or a source install to get Ghost running locally.

For option 1 - working mail config.

  • You need to edit the config.development.json file with a valid mail config, as per the mail docs.
  • For Ghost CLI this file is in the root folder where you installed Ghost
  • For install-from-source this file is currently also in the root folder, but watch out as it’s checked in and therefore gets overridden - very much recommend using the logs here.

For option 2 - use server logs.

  • If you’re using ghost cli, run ghost log to see the generated email content
  • If you’re using a source install, the content will appear in your console

All of this assumes that you’ve already:

  • Enabled members in labs (no need to change any settings, the defaults are fine).
  • Installed a members-enabled theme, like Lyra

@MLFromScratch I’ve tried both methods locally on my Mac and they work just fine. Your error message suggests either you’ve got misconfigured mail, or there’s some other problem with your specific setup and we’d need a lot more info: E.g. OS, DB, Node version, browser, config etc to help you debug.

3 Likes

I’m experiencing the exact same issue. Ghost isn’t providing anything helpful in the logs. What’s interesting is email is working fine with the admin panel for testing email settings.

Having similar issue.

I’ve worked out that with " Allow free member signup" setting OFF it does nothing when trying to ‘subscribe’. But then it allows you to use that when this setting is ON.

But then, it redirects to choose membership.

So I guess it creates the free version account immediately with this default subscribe option, and then if they don’t pick a payment option they remain that way.

I am having the same issue with a 3.0.3 Ghost installation and Lyra (https://secareanu.ro), although the mail config works (it’s setup up as direct, and sends emails through Digital Ocean droplet infrastructure) as I’ve managed to register one of my emails, but other people trying to register cannot as the “please provide a valid email address” message pops up after a while, even though the emails are valid (and the test email function in admin works, delivers the email to my inbox).

image

I have yet to test it with a different setup (i.e. AWS smtp or SES) and see if the issue persists and if it’s caused by Ghost or rather the DO droplet.

image

@dsecareanu which email provider have you set up? For many services unless you’ve fully completed the setup they will only let you email your own domain so it’s typical to find that emails to yourself (test emails) or staff members (same domain) work fine but once you are emailing other domains (members) the email will fail.

There is no email provider setup, the blog sends emails “Direct”-ly. It worked for a @gmail.com address (it also works for the blog’s domain), but it doesn’t work for a @hotmail.com address. The blog’s email address is the domain’s address, meaning @secareanu.ro. Emails usually end up in spam, even though the DO droplet has a fixed ip.

I’ve done the AWS SES/SMTP setup and now it seems that the subscriptions work fine (at least there is no more error message about invalid email address, need to check if it sends the confirmation messages). Yes, it works now.