Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[SOLVED] What, in the DB, could prevent email notifications of PMs being sent?

whu606whu606 MVP
edited January 2014 in Vanilla 2.0 - 2.8

Vanilla 2.1b1

I couldn't get email notifications for PMs working, but thanks to @peregrine and this solution, all seemed good.

http://vanillaforums.org/discussion/25702/github-bug-1758-email-notifications-not-being-sent-now-with-solution#latest

I was trying this on my cloned, test version of my live forum (on the same server.)

All good, so I made the same change on my live forum.

No email...

What I have tried

I set the the test site to point to the live db - no email.

I reset the test site to point to the BAK db - email.

I cloned my live site.

With the cloned site set to the live db - no emails.

Cloned site set to BAK db - emails sent.

I tried copying over the permissions and attributes for the relevant users from the BAKdb (which allows emails) into the livedb (that doesn't.)

No difference.

I cloned the live db, and then exported GDN_Users from the BAK db (that sends emails) to the cloned live db (that doesn't.

No difference.

In essence:

If I point a cloned copy of my site to the BAK db, it sends email notifications.

If I use the live DB, it doesn't.

Conclusion

Something in the live DB is preventing the notifications from being sent.

However, I haven't a scooby what it might be.

Anyone got any suggestions?

Comments

  • The only thing I know of that has something to do with notifications might be the activity table.
    Maybe you try backing up ActivityType and Activity of your BAK db, upload your live db tables into your BAK db and try again if notifications could be send...

  • LincLinc Admin
    edited December 2013
    1. A database error on the activity table
    2. A default other than zero on the 'Emailed' or 'Notified' column in GDN_Activity
    3. The wrong email address being in the copy
  • Thanks for that, guys.

    It has given me something to have a fiddle with.

    @Lincoln

    I'm not sure what

    The wrong email address being in the copy

    refers to.

    With one db, the message is sent, with the other it isn't.

    Are you referring to the email address in the User table?

  • peregrineperegrine MVP
    edited December 2013

    just for grins - try utility/structure when using cloned db.
    try adding a new test user (like before and see if the new user gets e-mail), after you set the preferences via profile.)

    are you sure the the only difference between the cloned and the live is one line change in config.php

    and clear out your cache .ini files.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Hi @peregrine

    I cloned the main site today, as I wanted to make sure that there wasn't a difference between the setup of that and my test site.

    For both the clone and the test site, one DB results in messages sent, where the other doesn't.

  • So, you are saying the only difference in the test site config.php
    and the clone site config.php is the database line.

    the config.php is the exactly the same except for that one line that refers to db.

    correct?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine

    No, although they are almost identical.

    The test site (devwhu606) was originally a clone of my live site, but there is a possibility I may not have copied over all changes/modifications.

    That's why today I copied the folder whu606, which holds my live site, and named it whu606bak.

    In config.php, if I point whu606bak to the live DB, no email is sent.

    If I change it to the bak db (which also works with my test site) an email is sent.

    So, as far as I can tell, I've ruled out any difference in setup/plugins/modifications as an issue.

    The issue is somewhere in my live DB, I just can't see where yet.

    I'll have more of a fiddle with Activity tables tomorrow, and report back.

  • @whu606 said:
    Are you referring to the email address in the User table?

    Yes.

  • @whu606 that is a great example of debugging and I wish others would follow your example. I think it's going to be a very small difference which will give your solution. I always use winmerge to check the differences between the 2 config.php files and ultimately the 2 sql dumps. Hopefully you only have to quickly export the user tables and compare. Will be fun to find the solution.

    There was an error rendering this rich post.

  • Well, I finally found what was causing the problem!

    After dropping and importing the tables one by one from the non-working DB to the working DB it turned out to be the permissions table that was breaking things.

    Not sure why, as to the best of my recall the 'working' DB was originally a clone of the 'non-working' one.

    Thanks to everyone for responding, and helping me get there in the end.

  • The Garden.Email.View permission governs the ability to receive notification emails.

  • hmmm good luck brother.

Sign In or Register to comment.