More than one person has recently asked me about MT-Notifier sending notifications on old entries. For better or worse, this is a behavior that you will see on recent versions because of the fact that the history file (introduced with version 3.5.0) didn't always work quite right. These bugs should have been completely worked out in version 4.0.4. Naturally, since some of you have been using MT-Notifier longer than that, you wouldn't have had history records anyway, but the end result is that you may find yourself with some notifications just waiting for the right time to be sent.
This can happen at any time that a comment or entry is saved, because that is when MT-Notifier is invoked. Previously, MT-Notifier attempted to try and figure out when it should run, but the problem with that is the duplicate processing detection never worked quite right - which is what led to the whole mess in the first place. Now MT-Notifier runs on any comment or entry save, which means even the oldest of comments or entries will invoke it. But you may also end up with lots of notifications being sent. Luckily, there is also a very easy way for you to make sure that these history records are created.
Simple navigate to the blog listing (System Overview -> Blogs), where you will see all the blogs that you have permission to administer. Once there, you can select any or all of the blogs on the screen, and from the drop-down list, choose "Write History Records". This begins the process of writing history records for all subscribers currently in the system. That means that if you have lots of comments, entries and subscribers, it might take a while. Please read that sentence carefully. Maybe even more than once. You might want to take a break while it runs, because it can create quite a few records. These aren't large records - each record simply contains the comment or entry id, as well as the notifier record id, and the audit (creation, modification, etc) information for the data that was sent. All told, it is perhaps 90 bytes per record, which isn't much (though the data can certainly add up over time). This allows MT-Notifier to maintain a list of when the data was sent, and make sure that duplicates are not sent out, even if the process is interrupted - something that plagued earlier versions.
Once the process completes, you should no longer see the problem of notifications being sent on older comments and entries. If you are - or were - concerned about upgrading, this is by far the largest complaint that I've seen thus far. Simply install the plugin, run the process, and you shouldn't have any problems thereafter.
Wow! I just finished sending you a rather long e-mail asking about this (and 2 other concerns - group management and category spam) and lo and behold, here you have answered one of my questions just yesterday! As though you were reading my mind. :)
Thank you for this - very informative. Look forward to hearing back (eventually) about the other 2 issues. Hope Notifier can do what I want it to do.
M.
Hi there, I'm getting a 500 server error when I try to write history records. Any idea why? Thanks, J
Hi Joseph -
The process of writing history records can be a lengthy one, because it will create them for every combination necessary on your system.
As such, it is very likely your server timing out. You may need to contact your host or server administrator to see if there is a way that they can lift this timeout for a short while so that you can create these records.
Another option is to run the process for fewer blogs (if you are running the process for multiple blogs), as that will let the process run faster.
Finally, you can run the process more than once - it will simply skip records that don't need history records, because they already exist. This will perhaps be a bit frustrating, but it will get the job done in "batches" and make sure that it works. Eventually.
Unfortunately there really isn't anything that I can do to help on your server configuration and a timeout issue is related to the server - most are configured so that if a process runs for so long, it is killed, so as not to stop the entire server from hanging up. If you explain the process to your host or administrator, they should work with you to get the history records written.
Thanks Chad! I'll run it multiple times and see if that works...
Sorry to bother you again, I've been running the Write Histories script over and over, and now I'm getting a new error "DBD driver has not implemented the AutoCommit attribute" it's the only thing I can see anywhere now... HELP!
Hi Joseph -
I'm afraid that I've never seen this message before (though you can find a number of instances by searching for it). It appears to have to do with the version of Perl - specifically the DBD::MySQL drivers - installed.
Since this is all at the code level that runs well under MT-Notifier, I'm not sure that there is anything that I can do here. Have you changed hosts recently? Or has your host upgraded Perl recently? You might want to check with them to see if you can find out anything in this area.
I'm contemplating changing hosts, it's been a nightmare and we've alienated lots of readers. Every time spam comes in Notifier sends out an email, sometimes multiple emails. Today it send out 10 emails! Is there a way to disable that trigger? ...to disable the link to comments? Thanks for your help Chad.
Hi Joseph -
According to my records, your original download was in January of 2008, which likely would have put you at version 4.0.2.
I don't know if you've been downloading updated versions - I can only assume so, as in order to write history records, you'd need at least 4.0.4.
In any case - if these "spam" comments are truly spam (that is, if MT marks them as spam), then MT-Notifier shouldn't send out a notification on that comment.
If the issue is that spam comments are coming in on older entries, which is saving them, and notifying users of new content, that's a slightly different issue.
There are really only two ways to deal with it.
One is to either close comments on old entries - really only an option if you don't get any comments on old entries (but potentially an option). Just keep in mind that unless you do this through the database directly, such an action would generate the notifications, because you are creating newly-updated/saved entries!
The other option is to complete the write_history process, and to do that, you might need the help of your host. The reason being is that this process needs to complete in order to get all the records in the database.