• I opened a brand-new multisite WordPress with subdirectory form, not subdomain form.

    And then I:

    1. Logged in as super admin;
    2. Enabled the option “Users can register a new account and create a new site.”, and saved;
    3. And then I logged out;
    4. And then I clicked “Register”, and I specified the new user name, and specified an Email address, and then I chose “I want a new site too” , and I clicked “Continue”
    5. And then I specified a new subdirectory name, and I clicked “Finish”.

    It prompts me that an activation Email will be sent to my Email address but it never comes.

    But I had some technical background so I started to troubleshoot this problem.

    1. I wrote a small script to test the PHP mail() function. It works.
    2. I logged in as the superadmin and I manually added a new site and that action triggered a user creation. I received all emails thereafter. Four in total. 1) User creation; 2) User name and password; 3) Site creation with its URL; 4) Notification Email to super admin.
    3. I logged out the superadmin and tried to register a user again. But this time I chose to create a user account only, not asking for a new site. This time I received the activation Email.
    4. I inserted some PHP code into wp_new_user_notification() and ask it to log when invoked. I found that the function is not invoked if I create a user and ask for a new site. Because the log file was not updated. On the contrary if I create a user and do not ask for a new site the function is invoked and the log file got updated as expected.

    Now the conclusion (and my question):

    1. If admin creates a new user together with a new web site it will succeed, and all email sent properly, no need for activation and the user name and password combination will be sent directly;
    2. If a user registers an account by himself/herself instead of by an admin, but not asks for a new site, he/she will receive the activation Email properly and he/she can create a new site thereafter without a problem.
    3. If a user registers an account by himself/herself instead of by an admin, and meanwhile ask for a new site (by choose “I want a new site too” option in the registration page), he/she will never receive even the activation Email.

    A WordPress bug, right? Please help me out by fixing this. This is completely nothing to do with Email server things so please don’t send that template, it won’t work if even wp_new_user_notification() has not been invoked.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Did you test this with all of your plugins turned off AND the default theme active on your primary site?

    I’m generally inclined to think it’s not a bug in core WP, since more people would be running into this. Normally when this sort of thing happens to a select group of people, it’s because a theme or plugin has a function clashing with WP.

    Thread Starter gaobo

    (@gaobo)

    Hi Ipstenu (or Mika?),

    I was using exactly the default Twenty Thirteen theme and enabling no plug-ins at all (not even Akismet and Hello Dolly).

    Thanks for your clarification question. So what now?

    Daniel

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Check your server’s mail logs. Is the mail being sent at all?

    Does your server have any restrictions on WHO can send email? Some lock them down so only your domain can send emails as itself (i.e. domain.com can only email out as me@domain.com and never as you@gmail.com)

    Thread Starter gaobo

    (@gaobo)

    Checked with my hosting service provider and they confirmed that there were no such settings for restriction. What’s more, my experiment shows that the wp_new_user_notification() function was not invoked. That indicates an obvious code defect instead of a configuration error.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I can’t reproduce that. Try doing the setup on your local computer, but every time I test this on a clean install, it emails.

    Thread Starter gaobo

    (@gaobo)

    Excellent to see the word “reproduce”, please allow me to create a test site for you.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Are you asking to make a test site on my sever or local PC?

    Have you done as I suggested and tried making a test site on your local PC?

    Also did you check with your email logs to see if it’s being sent, and your PHP error logs to see if anything was in there?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Aha!

    This MIUGHT be related to http://core.trac.wordpress.org/ticket/25166

    Thread Starter gaobo

    (@gaobo)

    Mmm, the ticket looks like the issue. So it has been merged to the next release of WP 3.6?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    3.6.1 – probably.

    Thread Starter gaobo

    (@gaobo)

    Well, now 3.6.1 comes into being – leaving the bug not fixed. I registered a new test user and asked a site alongwith it, and my spam folder increases by 1! I opened it with hope, well, it’s a real spam.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    The trac ticket is fixed, this just means your bug is not the same 🙁

    This is a thing you’re going to have to test out by closely monitoring your server’s email and error logs while you do it :/

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Activation Email does not send when asking for a new site from registration page’ is closed to new replies.