Known Issues and Fixes

There are currently two known issues with Subscribe2 and it’s features that are being caused by the core WordPress files. If you feel comfortable editing PHP code here are the fixes:

Issue 1: Upon activating the plugin you may get an error regarding openbase_dir

Issue 1 has been fixed by an update to the WordPress core files.

To resolve this issue locate the file install-helper.php in wp-admin. On line 2 you’ll find the following
require_once ('../wp-config.php');

Change this to:
require_once (dirname(dirname(__FILE__)).'/wp-config.php');

Issue 2: When a Subscriber confirms a subscribption the webpage shown will replace the names of all your pages with “Subscription Confirmed”

Issue 2 has been fixed by an update to Subscribe2.

To resolve this issue you have two options:

Option 1: Comment out line 2183 in Subscribe2.php.

Change it from:
add_filter('the_title', array(&$this, 'title_filter'));

//add_filter('the_title', array(&$this, 'title_filter'));

Option 2: Locate classes.php in wp-includes and edit line 521.

Change it from:
$output .= $indent . '<li class="' . $css_class . '"><a>ID) . '" title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '">' . apply_filters('the_title', $page->post_title) . '</a>';

$output .= $indent . '<li class="' . $css_class . '"><a>ID) . '" title="' . attribute_escape($page->post_title) . '">' . $page->post_title . '</a>';

93 thoughts on “Known Issues and Fixes

  1. On the second fix, am I mad or not. in Subscribe2.php n line 2166 I have nothing like the code you mention. I have a “}” and that is it. I don’t find the mentioned code in the surrounding lines.

    Possible type-o? Happens to the best of ’em

    The file appears to be version 4.

    Thanks for your help.

  2. Thanks! This clears things up a lot.
    I was scanning and re-scanning the comments from the previous post to try and decipher what needed to be done.

    One question: Are either of these fixes slated to be part of a future WP version? Any guesses at what point release number?

    Great plugin! We appreciate your good work!

  3. Ryan,

    The first issue is fixed in trunk and may be released into 2.3.2. (Presuming that 2.3.2 is released before 2.4.)

    The latter issue will hopefully be fixed for 2.4 but I really don’t know for sure.

  4. Hello,

    My subscribe2 seems to work ok in part, but I had a subscriber complain that she received notifications from whenever I updated a Page.

    I have

    Send Emails for Pages: NO

    Please help! Can I comment out the portion of the code that calls for emails for pages?

    WP 2.1.2
    Subscribe2 latest (Requires at least: 2.0.x, Tested up to: 2.2)

    Please email me. Thank you!!!

  5. Ethan,

    You can’t be using the latest Subscribe2 as it’s only for WordPress 2.3 and up.

    To fix your problem I’d suggest you move to WordPress 2.3.1 and Subscribe2 version 4.0. I am no longer developing or support for WordPress 2.1.x or 2.2.x

  6. I’m getting the follow message when I try to activate Subscribe2 4.0 on WordPress 2.3.1

    “Plugin could not be activated because it triggered a *fatal error*.”

    I’ve modified the install-helper.php file. I’m not actually getting any PHP errors in my logs, so I’m not sure where to look next. Any ideas?

    Current plugin list: Akismet, Coolplayer, GeneralStats, Get Recent Comments, Gregarious, Sexy Comments, Share This, WP-PostRatings and WP-PostViews.

  7. I’m using Subscribe2 4.0 on 2.3.1, and I’m, ironically, having the same problem as Ethan: although I have set the plug-in to NOT send out notices for pages, it still does. Any advice? Love Subscribe2, nonetheless! 🙂

  8. Presently it seems that ver 4.0 of the plugin (in WP 2.3.1) sends a message with blanks for the TITLE and POST CONTENT when a page is created or edited.
    These fields are fine when dealing with a new post. (Edits of existing posts do not appear to generate an email, even when timestamp is changed?!)

  9. After the fix for the first issue, the errors disappeared, but i got a new one in return: Parse error: parse error, unexpected T_VARIABLE in /www/[…]/wp-admin/install-helper.php on line 3

    The first 3 lines of install-helper.php read as follows:
    $debug = 0;

    Something I f-ed up perhaps?

  10. Ah, thank you. I couldn’t figure out what the problem was, but your reply made me realise something wasn’t right. Turns out my browser displays your website kinda funny. I’m sure it’s due to strange font settings, but segments of the text on your website don’t show for me, so i didn’t see the whole code 🙂

    Here’s what it looks like for me:

    I use Firefox 2.0 on Ubuntu. Maybe it helps. Anyway, when i changed the font size to something smaller, I saw the code and was able to copy/paste it. The updated plugin works perfectly now. Thanks again.

  11. Hello,

    I am having problems with the categories. No matter which options screen I’m at, I see the “list” of categories which is just lots of the boxes, and no text next to them. For some reason, it seems like it’s not finding the categories. Is anyone else having this problem? And what can I do to fix it??


  12. “I see the “list” of categories which is just lots of the boxes, and no text next to them. For some reason, it seems like it’s not finding the categories. Is anyone else having this problem? And what can I do to fix it??”

    I had that same problem before i upgraded to the latest version. Works fine now though.

  13. Mary M,

    As Marko has hinted, you need to make sure you are using the correct version of Subscribe2 for your version of WordPress. The categories will then work as expected.

  14. I also got the “Plugin could not be activated because it triggered a fatal error.” message. Turned out I needed buttonsnap.php to be in the root of the plugins folder.

  15. Is there any way to alter the delivery times of the daily notification? Also i would like to test the output before rolling it out to my subscribers. what do you suggest? thanks!

  16. SSinclair,

    You’ll need to edit the code on line 1302 to alter the daily time. Have a read on the site about how mktime works and change the numbers to your preferred time schedule.

    As for testing output – try using a sandbox install of WordPress on an alternative database – that’s the way I develop my code.

  17. Hi Matthew, nice to see the plugins has gone a long way under you ‘coding command’ since you took over from Scott. Great work! 🙂

    One thing I noticed: in the latest version, buttonsnap.php is still required to be in place although it is not actually needed (I presume?) for anything anymore. Not placing the file directly under /plugins/ will cause the error “Plugin could not be activated because it triggered a fatal error” as mentioned in these comments before.

    Since version 4.x is only for WP 2.3+ anyway, you might as well rip the Buttonsnap Library – that has served so well in the past – out 🙂

    Anyway, great work and if I find some time, I will send an updated Dutch .mo file your way.

    Cheers, Allard van Hagen

  18. Raven,

    Hi Allard, it’s been a while. Don’t I need buttonsnap.php in 2.3+ for users who aren’t using the WYSIWYG editor?

    Will loo forward to the Dutch translation when you get a spare minute 🙂

  19. Little probleme with fixed issue 1 :

    Parse error: syntax error, unexpected ‘;’ in /home/www/9d4f3154f6729aff6bfa5f5074b74197/web/blog/wp-admin/install-helper.php on line 2

    But the plugin seems to be working anyway.

    There’s the 3 firs lines of my install-helper.php :

    $debug = 0;

  20. In fact I’ve just copy/past your code before the “;” and replace the older code.

    And you’re right there missing a ) before the “;”.

    May be you should edit your post for PHP dumbass like me. 😉

  21. Howdy,

    I jumped back on the Subscribe2 bandwagon by upgrading to 4.4. I set the delivery schedule to 1 hour – just to test things out. No go… Man, I just hate to tell you this news. Remember, I am at version 2.3.2 WP.

    Still staring in anticipation at my inbox for that elusive autosend!



  22. Patrick,

    That’s not the news I wanted to hear 😦

    Let’s try some bug chasing and see where the code gets to before it stops executing.

    Add the following line to the subscribe2_cron function:

    wp_mail('your@email.address', 'Break Point', 'The code executed to here!');

    Each time Subscribe2_cron is called you’ll get an email, move this line up and down until you can figure out where the code is failing.

  23. Still getting the error “Plugin could not be activated because it triggered a fatal error”. Even buttonsnap.php is in /plugins root dir. Any suggestions?


  24. Dathvader,

    Have you uploaded ALL of the files and folders within the subscribe2 folder? Have you tried deleting the files from the server and re-uploading from a freshly downloaded version of the plugin zip file?

  25. Hi,

    it works. but when the user receive an e-mail, the following appear as first line in the e-mail:

    X-PHP-Originating-Script: 32707:subscribe2.php

    any idea?

  26. Alhashemi,

    You’ll have to check this with your hosting provider as this line is not being added by the plugin but may be coming from the mail handling program on the server.

  27. PrestonPalmer,

    This seems to be a conflict between plugins linked with the buttonsnap library used as part of the plugin. I’m working on a fix but make sure you are up to versions of ALL your plugins and look out for the next release of Subscribe2.

  28. I’m using the latest WordPress and Subscribe2.

    When someone tries to subscribe to our mailinglist, the confirmation e-mail is send as it should be. So far so good, but…when you click on the link in the confirmation e-mail my site gives an error saying that message (where it should show the confirmation of the subscription) couldn’t be found.

    And so no one can subscribe…
    Any fix? Thanks!

  29. And to addition to my previous posting:
    when writing a new message no subscriber gets an e-mail, not even when I choose to write a message for the mailing list only. Before updating the plugin (and before wp 2.5) everything worked fine.

  30. A thousand times sorry for my spamming of your mailbox, all issues solved!
    I had to do the @mail( fix to get it all working again.

  31. Hi, I’m using Subscribe2 4.5 and WP 2.3.3.
    Everything works great, it’s just one little thing: when a user wants to unsubscribe, he gets the error message “Sorry, there seems to be an error on the server. Please try again later.”, but in a few minutes, he gets the confirmation email anyway.
    Any idea what could be wrong and how to solve it?

  32. Hi, I’m using Subscribe2 4.6 and WordPress 2.3.3 with Swift SMTP plugin. When I try to subscribe via the form, it gives me this error:
    Message failed to send to [email] from [blogname]

    Sorry, there seems to be an error on the server. Please try again later.

    When I test sending email in the Swift SMTP options the emails get sent, but not when used with Subscribe2. I’ve changed @mail to @wp_mail in Subscribe2.php, does anyone else have this problem? How would I find out what the error is?

  33. dlamoris,

    Have you tried using Subscribe2 without the SMTP Plugin? The error you are seeing is from Swift SMTP not Subscribe2 so I’m sorry to say that I have no idea about tracking it down.

  34. Without using SMTP sending mail works, but only for certain addresses I tested. gmail addresses work for everything, another edu address gets sent the confirmation email but not posts, and yahoo address doesn’t get anything at all (it’s not in spam either). I tried the bcc trick but don’t think that solved it…

  35. dlamoris,

    Subscribe2 doesn’t batch sending of emails by address so if some users are getting them and others are not it will be a server issue somewhere along the way. Yahoo seem to be a big offender in just dropping email that is considered spam rather than tagging it or moving it into a spam folder.

  36. Hello, I used Subscribe2 4.6. I have au bug for the translation of certain lines. On subscribe2.php file, line 1996, I see :

    echo __(‘By Registering with this blog you are also agreeing to recieve email notifications for new posts’) . “\r\n”;

    The translation of this line is not provided by wordpress, but the translation for the plugin.

    The line should be :

    echo __(‘By Registering with this blog you are also agreeing to recieve email notifications for new posts’, ‘subscribe2’) . “\r\n”;

    I am wrong?

    P.S : I use the french translation of Lise :

  37. Hello Matthew!

    I have rewrote your plugin in order to serve my needs. However, I got an issue. Now the plugin sends e-mails only when publishing new posts. When editing a post, I also would like to have Subscribe2 send an email notification to registrants.

    I tried using instead of:

    add_action(‘new_to_publish’, array(&$this, ‘publish’));

    to use:

    add_action(‘publish_post’, array(&$this, ‘publish’));

    or wp_insert_post, or edit_post. Actually, it works, Subscribe2 sends the new e-mail. However, the Subscribe2 variables are not shown – TITLE, BODY, LINK, etc.

    I cannot find anything about the hook ‘new_to_publish’ on the internet.. Can you help me?


  38. Ickata,

    More information on the hook is here. Basically, the reason it’s not working is that the Transition Hooks pass the entire post details but the hooks you are linking to only pass the post ID. You’ll need to make more code amends by hooking to a function that collects the entire post and then passes that to the publish function.

  39. I’m running WP2.5 with Subscribe 4.7. When a registered user (subscriber role) goes to the subscriptions page via the token’s link, there are two options available under profile: “Your Profile” and “Subscriptions”, and they are taken directly to Subscriptions.

    However, if the user clicks on “Your Profile” or the Profile link in the upper right, the “Subscriptions” link/button disappears. They would have to go back to the Token page to get to it again. How do I keep the “Subscriptions” link/button visible in the Profile admin area?

    I’ve searched these comments and the WP forums for this – found one mention of it but turned out that user had a different issue.

  40. Hi!

    When I try to activate the plugin, it is giving me an error code on line 1307. I read through all of the comment, but didn’t seem to find the answer. Has anyone else had a problem?

  41. Stephanie,

    Not a problem I’ve had before but it would also be very helpful if you could tell me what the error actually is and what you’ve tried so far in trying to fix it.

  42. Thanks,

    Here is what it is saying

    Parse error: syntax error, unexpected T_ECHO, expecting T_FUNCTION in /home1/turningh/public_html/wp-content/plugins/subscribe_2/subscribe2.php on line 1307

    I have not tried anything to fix it. i’m rather illiterate when it comes to this kind of stuff. 🙂 But, feel confident that I could fix it if I knew what was wrong.

    Thanks for your help, I appreciate it.

  43. Guess I should mention that I am switching over to a wp site. The site above is what will be changed over. I know it won’t work on GoDaddy. 🙂 Everything is on a temp URL right now.

  44. Stephanie,

    In my copy of the code there is no echo command on line 1307. I can only assume that your copy is corrupted in some way. Try grabbing a fresh zip from the download site and re-upload the entire plugin folder having deleted the old folder first.

  45. You know what, scratch what is up there. I found it under settings. It was totally me. Reloading it got it to activate, I just didn’t know I needed to enable the widget.

    I’m so sorry. Awesome plugin, thanks so much for your help. I really appreciate it.

  46. The plugin is working great.
    When a new subscriber clicks on the email confirmation, they go to my site, and get confirmed, but my sidebar doesn’t show up. Any suggestions as to why

  47. Hi,
    I just installed the Subscribe2 plugin and run into a variant of issue2. Just instead of all names being “Subscription Confirmed” all page names were blank.
    Commenting out the add_filter(‘the_title’ … line as described in option 1 (line 2482 in S2 4.9) fixed the issue.
    (Running WP 2.6.1, S2 4.9, default theme)

  48. I uninstalled 4.9 and installed 4.8. Still will not notify those registered to my site.

    Any known conflicts with Redirection 2.0.5 A redirection manager By John Godley?

    Any ideas would be greatly appreciated.

    Can’t wait the get subscribe working again.

    Karl Davidson

  49. Karl,

    There are no issues with that plugin that I’m aware of. Try disabling it and see if the problem resolves. If not then contact your host for information from the server logs about why the emails aren’t being sent.

  50. I’ve tried everything to get my Subscriber2 to work again. Please review the following to see if I’ve set something incorrectly.
    Current Subscribe 2 Options are:

    [autosub] => yes
    [wpregdef] => yes
    [autoformat] => text
    [autosub_def] => yes
    [bcclimit] => 0
    [s2page] => 0
    [pages] => yes
    [password] => no
    [private] => no
    [email_freq] => never
    [exclude] =>
    [sender] => author
    [reg_override] => 1
    [show_button] => 1
    [widget] => 1
    [barred] =>
    [mailtext] => BLOGNAME has posted a new item, \’TITLE\’


  51. I contacted my host provider, as you suggested, HostMonster and they checked the error log for my e-mail account. It was working perfectly, and no e-mails were being bounced.

    Thanks again for your help,
    Karl Davidson

  52. This is the message I got. When it says check with hosting provider, what do I ask them to do? I’ve had them check for bounced e-mails on the error log.

    What settings should I check?

    Message failed! Check your settings and check with your hosting provider
    Language string failed to load: instantiate


  53. Karl,

    That message is telling you that phpMailer failed to connect to your server to send the email. HostMonster should be able to tell you what you need to do. Most hosts allow the php mail() function but it would appear that HostMonster don’t.

  54. I contacted Hostmoster. They went to my site and wrote mailer.php see below: It worked beautifully. The phpMailer function is working at HostMoster.

    Could something be wrong with WordPress? Check this thread:


    $Name = “Da Duder”; //senders name
    $email = “”; //senders e-mail adress
    $recipient = “”; //recipient
    $mail_body = “The text for the mail… from”; //mail body
    $subject = “Mail Test”; //subject
    $header = “From: “. $Name . ” \r\n”; //optional headerfields

    mail($recipient, $subject, $mail_body, $header); //mail command 🙂
    echo ‘Mail sent successfully!!!’;

  55. Additional information: When I send an e-mail with Mail Subscribers to a public subscribers the e-mail is sent. However, when I try to send registered users I get:

    Message failed! Check your settings and check with your hosting provider
    Language string failed to load: instantiate

    I’m using Register Plus to register my blog members. I deactivates the Register Plus plug-in, but it still won’t work.

    Karl Davidson

  56. Karl,

    The mail tester script is actually not complete. Mail() returns true or false based on whether it worked or not so the last few lines of the check script should be:

    $status = mail($recipient, $subject, $mail_body, $header); //mail command
    if ($status) {
    echo ‘Mail sent successfully!!!’;
    } else {
    echo 'Mail Sending failed!';

    This is exactly the code I'm using and you are getting failure notices.

    Also, if you read the whole of the thread you reported you'll see that the problems are server setup related because some servers like certain email headers and other servers don't. It's not possible to program for all the possible eventualities, especially when at the most basic level one server will block mails with a reply-to header and other servers require it to send emails!

  57. Matthew,

    What is puzzling me is that everything worked beautifully on HostMonster until I ungraded to 4.9 from 4.8 with WordPress 2.6.

    I’m having the same problem as Bob Smith. Do you know what he did to correct the problem? See Bob’s post below. Thanks Karl (My mail subscribers works with public subscribers)

    bob smith Says:
    September 1, 2008 at 2:54 am

    I am the host.. I checked the logs.. no entries for anything related (or not related)

    the “mail subscribers” works. so email is working..
    but when i post, nothing happens. again,
    here was the timeline.

    running wp 2.5 and subscribe 4.8 (worked)
    upgraded to wp 2.6 running 4.8
    everything still worked.
    upgraded to subscribe 4.9 – stopped working.
    downgraded to 4.8 still doesnt work
    upgraded to wp 2.61 running 4.8 – doesnt work
    back to 4.9 – still nodda

  58. Karl,

    I agree that these things appear puzzling, but you have reverted back to 4.8 and it didn’t suddenly work again.

    There are no other changes I’ve made other than to the code files (i.e. no database changes) so the issue cannot be with the plugin alone.

    Does the HostMonster mail test script work with my amends to the code? Do you actually get the email?

  59. Hi Matthew,

    I have thought of an alternative solution to avoid having to comment out the line
    add_filter(‘the_title’, array(&$this, ‘title_filter’));

    All it takes is to declare the cache variable $s2page_title at the bottom of the class and modify the function title_filter() as follows:

    function title_filter($title) {
    if (!$this->s2page_title) {
    $this->s2page_title =
    if ($title == $this->s2page_title && in_the_loop()) {
    return __(‘Subscription Confirmation’, ‘subscribe2’);
    } else {
    return $title;
    } // end title_filter()

    That way, the filter function will only modify the title of the page whose ID is s2page, leaving any other titles unchanged. This makes the check of $this->filtered unnecessary as far as I’m aware.

    The use of the line
    $this->s2page_title = &get_post($this->subscribe2_options[‘s2page’])->post_title;
    instead of a call to the function get_the_title() is better because the latter is affected by the title filter that we are executing. This leads to infinite recursion and a stack overflow.

    Many thanks for your excellent plugin


  60. Jorge,

    I thought I’d fixed this in the current version of the code by checking if the filter was being applied during the_loop. Are you still seeing this issue using Subscribe2 4.11?

Comments are closed.