Troubleshooting Forms

The most common issue with MT-Notifier involves the integration of the subscription checkbox with the comments form. There are two common errors with this process. First, a sample checkbox:

<p><label for="subscribe">Subscribe to This Entry:</label>
<input type="checkbox" name="subscribe" value="1" /></p>

Note the name of the checkbox, and that there is a value. These things are important! If you do not have the name set to subscribe, the subscription form will not be able to find the value you submit, and will not create a subscription.

Somewhat related is the value. If there is no value, MT-Notifier will not see that there is anything to be done during the posting of the comment, and it will not create a subscription.

Another common (and similar) problem is that the name on the form fields are not set correctly on the standalone forms. Here is a form to subscribe users to a blog:

<form method="get" action="<$MTCGIPath$>plugins/Notifier/mt-notifier.cgi">
<input type="hidden" name="blog_id" value="<$MTBlogID$>" />
Subscribe to This Blog<br />
<input name="email" />
<input type="submit" class="button" value="Go" />
</form>

If the name of any of the fields is incorrect, then MT-Notifier will not be looking in the right place for the data you are submitting! To subscribe to an entry, you should use entry_id, for a category, category_id and blog, blog_id.

Also make sure that, even if you have spelled the name correctly, you have not included any extra spaces. For instance, a name of "blog_id " (note the space at the end) is not the same as "blog_id". If you get a message about an invalid or missing key, this is where you should check first. Make sure the field names are right!

If the name is right, make sure you use the correct ID. For the entry_id and blog_id, you can use the Movable Type template tags <$MTEntryID$> and <$MTBlogID$>;, but there is no such tag for the category ID. In that case, you'll want to use a template tag supplied by MT-Notifier for just this purpose, <$MTNotifierCatID$>.

More Information on "MT-Notifier" »

Comments

When I have a form submission, I keep getting the error:

The specified email address is not valid!

Upon further examination, I noticed that the @ symbol is replaced with %2540 in the address. When I replaced it with an actual @ then it worked.

I'd appreaciate any sort of insight into this issue.

Thanks!

My problem is not quite the same - I am getting an execution error when attempting to subscribe to the blog.

The subscribe request generates this URL:
http://www.techslog.com/movabletype/plugins/Notifier/mt-notifier.cgi?blog_id=1&email=chrisb@drextec.com

And that only gets me a 500 error...

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.0.46 (Red Hat) Server at www.techslog.com Port 80

I have the cgi file in place, and the directory permissions include execute.

I am testing MT-Notifier and have installed it on a MT 3.33 install. I am now testing the form and keep getting the following error no matter how I configure the pluging settings and form:

"The requested record key is not valid!"

Here is the form code I am using:
<form method="get" action="<$MTCGIPath$>/plugins/Notifier/mt-notifier.cgi">
<input type="hidden" name="entry_id" value="<$MTEntryID$>:1" />
Subscribe to Alex's Bar weekly show and event updates!<br/ >
<input name="email" />
<input type="submit" class="button" value="Go" />
</form>

I get the above error regardless if I use the entry_id or blog_id or category_id options. Does this mean that the plugin is not interacting with the database correctly? A table named mt_notifier_data has been created.

Please advise.

Hi Ms. Jen -

I think the problem is that you are using an older style of key. Notably, you are using (for instance) "<$MTEntryID$>:1". Instead, you should use only the entry ID. In other words, "<$MTEntryID$>" - not with the ":1" appended to it.

What is happening is that it's trying to verify that the entry (or category, or blog) exists, and with that ":1", it can't do so, because that makes for an invalid item in your database.

Hi Chad,

If I make my form, as such:

<form method="get" action="<$MTCGIPath$>plugins/Notifier/mt-notifier.cgi">
<input type="hidden" name="category_id" value="<$MTNotifierCatID$>" />
Subscribe to Alex's Bar weekly show and event updates!<br/ >
<input name="email" />
<input type="submit" class="button" value="Go" />
</form>

I save & rebuild my template, the go to test the form, I get the following new error:

Your request did not include a record key!

Any suggestions?

Also, is there any way to call out a specific entry or category or blog, the way that one can in Multiblog?

Thanks for your help!

It's very difficult to say without seeing the page in question - but if the field is blank, then you might be submitting it correctly, but without anything in the field.

If you look at the source of the page, is there anything there (in other words, is the <$MTNotifierCatID$> tag being parsed correctly?

If not, is this a dynamic archive? Did you put the PHP plugin into the PHP "plugins" folder? Are you having problems with the entries, or the blogs, or is it just the categories?

As to your final question, you'll have to be a little more specific - I'm not sure what you mean by "call out".

I installed the plugin and added this code to my comment form:

<p><label for="subscribe">Subscribe to This Entry:</label>
<input type="checkbox" name="subscribe" value="1" /></p>

I see the check box and left a few comments...nothing. No effect. Any advice?

Hi Solomon -

Your form looks fine. I would suggest checking to see if the plugin is installed correctly.

The first place to look is your system-level plugin screen. Do you see MT-Notifier listed? If so, are there any errors?

The second place to check is the system-level activity log. Specifically, check this immediately after you try and subscribe (otherwise any problems you have may get buried under other activity). I am mostly curious if you have any problems with settings.

OK! Per your recommendation, I looked in the error log and saw this:

" -- No sender address available - aborting confirmation!
No sender address - please configure one!"

I went in to the blog-level plugin settings and changed the default sender (system) to my own email.

NOW...I tried a test message...nothing...

THEN...I tried a test message using another email address, though that email account is hosted at the same hosting service as my blog...nothing...

THEN...I tried a test message using a GMail address...THAT worked.

Could have something to do with the host and not sending email properly through its own system? I don't know. Never had a problem emailing myself across addresses.

Hi Solomon -

I'm glad that you found the problem, but I'm afraid that there isn't too much more that I can do at this point, since it sounds like MT-Notifier is working, and it's something at your host now.

You may want to check with your host and see if there is a problem sending email through your host via Perl APIs (or SMTP, if that's what you're using in MT).

Frankly, I'd suspect it would work the other way around before it would work they way you are saying, but perhaps they could shed some light on it.

In the meantime, I updated the installation intructions with some additional information that should (hopefully) help people with this sort of an issue.

Oddly enough, I tried yet another email address on the same server, and that one worked fine. I just realized that second address I tried is on a different host. I suspect spam trap issues perhaps. Anyway, it seems to work now, thanks!

I installed MT-Notifier v2.5.1 into Movable Type version 3.2 but emails are not being sent. When I look in the activity logs, I see the following message; "MT-Notifier died with: Can't use string ("Everitz::Notifier") as a HASH ref while "strict refs" in use at /blog-mt1/lib/MT/App.pm line 1089."

Hi Kyle -

To begin with, as outlined on the download page, MT-Notifier version 2.5.1 is designed for MT 3.1x, not MT 3.2. Furthermore, that version is quite outdated - it was released over 18 months ago, so it is no longer supported (that's also mentioned on that same page).

That said, I suspect that you're using Yahoo! hosting, based on your path. You might want to look at this page that describes how to get plugins working with Yahoo! (not specific to MT-Notifier, but it may help).

If it doesn't, and you need help, then I am available for contract work, but I'm afraid this falls outside of the scope otherwise. Sorry. You may want to change to a different host where you can run a current version of MT (and, by extension, a current version of MT-Notifier).

You do have on other option - the Yahoo! package comes with a version of MT-Notifier, but it is based on even older code, it has been customized, and it wasn't licensed in any way, so I'm afraid that I can offer even less advice. But if it works for you, it might serve your needs.

Getting this error:

Can't locate FCGI.pm in @INC (@INC contains:.......) at /home/ovation/public_html/cgi-bin/extlib/CGI/Fast.pm line 22.

BEGIN failed--compilation aborted at /home/ovation/public_html/cgi-bin/extlib/CGI/Fast.pm line 22.

Compilation failed in require at ../../lib/MT/Bootstrap.pm line 51.
BEGIN failed--compilation aborted at ./mt-notifier.cgi line 10.

Install and cron job seem fine.

Hi Gary -

It sounds like mt-notifier.cgi is trying to run under FastCGI, which would perhaps happen if regular cgi scripts have been configured to run as FastCGI. I'm not sure what would happen here, as I've never tried this configuration.

I'm guessing a bit here, as you don't mention which version of MT you are using, but this sounds like version 3.34, which has the FastCGI code in the Bootstrap module, and it is line 51 of that module. I can't see it happening elsewhere.

If you have enabled processing of cgi scripts as FastCGI, you could either disable them for this directory, or perhaps making more sense, you could disable them for everything under the plugins directory, because I suspect you would have the same problem for other plugins as well - it probably has something to do with being in a subdirectory.

Thanks, Chad. I don't recall actively turning on FastCGI (don't even know what it is!) but am looking into how to disable it and exactly what else might be relying on it. Will post my progress/results with it if I figure it out.

I have contacted my hoster, posted a note on the MT forum, etc., and this is a very confusing and cloudy issue. The MT viewpoint is it's a hosting problem, the hoster says it's an application problem. All I know is MT Notifier is the only plugin (1/28) where this issue is surfacing. I am running 3.34. I haven't contacted MT support about how to disable FCGI.pm, but from what I've read it's supposed to be a good thing, so not sure why I'd disable it, although MT-Notifier won't run for me with it on. Any clarity you can provide would help! Thanks, Gary

I have been using MT-Notifier for some time now, but after adding another MT plugin, I have found an incompatibility problem. I really can't live without either plugin, so I really could use some help.

I had an older version of Notifier installed when the problem first cropped up. I installed the SmartRebuild plugin for MT, which allows background rebuilding of templates so that saves and commenting are infinitely faster.

Problem is...Notifier sends duplicate emails when this plugin is active. The number of duplicates isn't consistent either. Sometimes it just sends two copies, other times it has sent as many as 10 copies of the exact same entry notification. When I turn off the SmartRebuild plugin, this behavior stops.

I upgraded to the most current version of notifier to see if the problem went away. It didn't.

This is a major problem as we want to use Notifier more extensively than we already use it, but we can't if it's going to be sending duplicates willy-nilly. Right now, we have stopped using it (though we paid for it) because commenting takes about 10 times longer without the SmartRebuild plugin.

Please help!!

Hi Jerame -

Troubleshooting with another plugin in the mix - especially when you have determined that that plugin is a part of the problem - is difficult at best. But one thing that I'd suggest you do is check to see if the history table is being populated.

This table is present in the 3.5.0 version of MT-Notifier, and is designed so that if a notification is sent to a user, there should be records in the table, so that no user is ever sent a duplicate. If the table isn't being populated, then that is at least a place to start (to try and determine why this isn't the case).

Chad,

Thanks for the reply...

I looked at the history table in the database and I see what indeed appear to be duplicates. I assume that if "notifier_history_data_id" is say 58 and "notifier_history_entry_id" is say 3052 that means that subscriber #58 has been sent notification on entry #3052. And therefore there should only be one entry with 58 and 3052. But that's not what is happening. There are duplicates.

Mostly the duplicates are exactly 3 hours apart - down to the second.

Here's one example so you can see what I mean. Not everyone gets duplicates and some get more than others. I don't understand how some get dups and others don't. It's very random.

That is indeed odd. What I don't know is what the data_id represents. For that, you'd need to look at the "data" table, which would tell you if the subscription is to the entry (for comments), or if it is to a category or a blog.

That may help to determine the problem, but without knowing a bit more detail, it's going to be difficult to track down. Perhaps you are receiving a comment three hours (for example) after the first one, which is triggering something. Or maybe you have a scheduled rebuild, or a job running to post scheduled entries?

Yes, I do have a job that runs the periodic-tasks cycle, but it is every 15 minutes. I don't actually offer the subscription signups on the site, so the only thing anyone can subscribe to is the blog. I only have 6 subscribers because I couldn't put a feature up live that didn't work properly. These are just my guinea pigs who I added myself.

I think it's a bug in the programming that only crops up under certain circumstances. It's clearly an issue with auto-rebuilding and notifier. Whatever the trigger is to send out the messages gets re-triggered when a rebuild happens. I just don't understand why it's doing it to only some of the subscribers.

One thing I can think of...The person who gets 3 versions of the message has subscribed and unsubscribed a few times. Perhaps there is a bug in the subscription mechanism that makes someone who re-subscribes get multiple copies? I know that the two people who don't get duplicates have never unsubscribed and resubscribed.

Anyway, it really sucks because it's such a great plugin otherwise, but that fast rebuild plugin makes such a huge difference in comment speed and such that I have to keep it.

If there is any way to get this figured out, I'm all for it.

If they have unsubscribed and re-subscribed, then it's not exactly a bug. The entire purpose of the history table is to keep track of the subscriber that has been notified.

Once someone has unsubscribed and resubscribed, they are no longer the same subscriber.

To look at your example, if subscriber #58 is notified, and then they unsubscribe and resubscribe, they could potentially be notified again - but they should probably not be subscriber #58 again in that case.

When someone goes through the process where they remove themselves from the subscription process, it should create a new record - so a new subscriber should be #59 (or something other than #58, at any rate).

The best way to determine otherwise would probably be to look at the data. Contact me directly via email (using the address here on the web page, or the one you received in your licensing email) and we can talk further about this option.

I always get: "The specified email address is not valid!"

Alexander Spoerer also described the same problem ( the first comment from September 13, 2006).

Btw, I updated to MT-Notifier 4.0.1, but the plugin still says it's 4.0.0. Is this ok?

I found out that only in Firefox I can subscribe emails. In all other browsers I get the message: "The specified email address is not valid!".

You can see it here: http://www.samocska.com/test/

"@" is replaced by %2540 in the address bar. If I manually change it then it works.

Can you help me?

Hi Martin -

What you are seeing is a URL-encoded value. %40 represents an ampersand, and %25 represents a percent sign. Since you are seeing both (that is, %2540), it seems that your ampersand is being encoded, rendering %40, then the percent sign itself is being encoded, rendering %2540.

Perhaps you are doing some redirection or something? If so, try turning it off and this should take care of it. Since this is all handled by the server and browser, it shouldn't have anything to do with the plugin.

But just to make sure, I dropped the widget from the MT-Notifier 4.0.1 install on a basically stock installation and was able to subscribe without a problem in both Firefox (2.0.0.9) and Internet Explorer (7-something).

As to the version number, you should definitely see "MT-Notifier 4.0.1" in your plugin settings. Remove the entire "Notifier" directory and upload it again from the 4.0.1 distribution and you should be set.

Thanks Chad,

You were right, redirecting was the problem. I'm using .htaccess to redirect all urls to www. The path in my form to the admin script didn't have www and the server was adding it.

I also deleted the Notifier directory and uploaded it again and now the plugin settings show ver. 4.0.1

Hi Martin -

That's great (on both counts)!

I'm not sure if this is the best place to post this, but here it goes.

We are running MT4 with MT-Notifier 4.01. We are having trouble getting the category-subscriptions working. Everything else is working fine (as far as I know). Much of our data has been carried over from MT3.34. New category subscriptions are being acccepted, but again, the email notifications aren't sent. Any thoughts?

Hi Dave -

Did you read this entry about sending category notifications?

Hi Chad,

Thanks for the quick reply! I'm not sure how I missed that entry, but I believe that solved the problem. Great plugin by the way.

Thanks again.

Hi Chad,

I am trying to integrate your code fully functional on my blog. But there is an issue that disturbs me, and I appreciate it if you could help me resolve this issue. I searched everywhere to find a solution, but no luck.

What I would like to do is to make the notifier's check-box work with "Rememberme" checkbox. It is little bit silly that the users have to select the notification checkbox every time they leave a comment, even when they use rememberme checkbox.

I am sure there are others, who will use the code to do the same on their blog.

What I've done until now is that I added following lines to "javascript template", but It seems that I don't know how to finish it:

1- Under function "rememberMe", I added

if (f.subscribe != undefined)
    setCookie('mtcmtsubs', f.subscribe.value, now, '/', '', '');

2- Under funtion "forgetMe", I added:

deleteCookie('mtcmtsubs', '/', '');
    f.subscribe.value = '';

3- Under "if (document.comments_form)", I added:

if (document.comments_form.subscribe != undefined && (mtcmtsubs = getCookie("mtcmtsubs")))
    document.comments_form.subscribe.value = mtcmtsubs;

That's it. I don't know how to continue. I know that is too much to ask, but I really appreciate it, if you could help me with this code.

Thank you in advance,
Regards,
Nicholas

Hi Nicholas -

You're actually very close. The problem is with the third part of the JavaScript. The value that is stored in the cookie is the value of the checkbox - in this case a 1 or a 0. But the checkbox needs to be set to a true or false value. For comparison, look at the bakecookie code.

If you change your code to look like this:

  if (document.comments_form.subscribe != undefined) {
      if (mtcmtsubs = getCookie("mtcmtsubs")) {
          document.comments_form.subscribe.checked = true;
      } else {
          document.comments_form.subscribe.checked = false;
      }
  }

It should work fine (in fact, I have this running on my personal blog, in case you would like to take a look).

Hi Chad,

First, I would like to thank you for your reply regarding the cookies. I did not reply to you sooner, I wanted to test it for a while.

As I mentioned earlier, I tested your method and unfortunately it did not work as I expected. I tried little more and found a way to do exactly what I wanted, so here is what you get:

1- Check-box and cookies will work also on comment preview page.
2- Unchecking "forget me" will uncheck and remove the cookie for MT-Notifer.

First part:

<input type="checkbox" id="comment-notify" name="subscribe" onclick="if(this.checked==true) {setCookie('mtcmtsubs', this.checked, '', '/', '')}; if (this.checked==false) {deleteCookie('mtcmtsubs', '/', '')}" value="1" />

Second part in Javascript, under rememberme function:

if (f.subscribe.checked != undefined || f.subscribe.checked != false)
    setCookie('mtcmtsubs', f.subscribe.checked, now, '/', '', '');

Part three, in javascript, under forgetme:

deleteCookie('mtcmtsubs', '/', '');
    f.subscribe.checked = '';

And the last part, in javascript:

if (document.comments_form.subscribe) {
    (mtcmtsubs = getCookie("mtcmtsubs"));
    if (mtcmtsubs == 'true') {
        document.comments_form.subscribe.checked = true;
    } else {
        document.comments_form.subscribe.checked = false;
    }
}

That's all. I am not sure if it is possible to write it better than what I did.

Hi Nicholas -

Looks good - it appears that you added the setting (and clearing) of the cookie to the actual checkbox, as well as some additional logic along the way.

You could also simplify your last routine a bit, but other than that it should work fine. I'm glad that it worked out!

Hello Chad, I've installed MT Notifier on a MT 4.1 Professional Pack with spanish language. The plugin sends the confirmation emails but not the comments reply notifications. Which could be the problem?

Thank you.

I think it is not working because my Commenting Policy is set to: Immediately approve comments from Trusted commenters only. Should it work even with this setting?

Hi Chad, e-mails are not being sent on my blog when they are not published immediately, if they require my aproval. Should it work?

I'm trying to set up category subscriptions on my blog. Although I've set up the form correctly - I get a confirmation email that shows the correct category and the subscriptions manager shows that I've a valid subscription once I confirm my request – I don't get any notification emails, whether I create the entry using ecto or using Movable Type's web interface. I'm using Movable Type 4.1 with Professional Pack.

Post a comment