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'));
To:
//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>';
To:
$output .= $indent . '<li class="' . $css_class . '"><a>ID) . '" title="' . attribute_escape($page->post_title) . '">' . $page->post_title . '</a>';
RSS - Posts
October 31, 2007 at 12:39 am
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.
October 31, 2007 at 8:09 am
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!
October 31, 2007 at 9:56 am
Jon Fox,
You are quite right Jon, it should be line 2150 in Version 4.0. It’s going to be around line 2166 in 4.1 of the plugin.
October 31, 2007 at 9:57 am
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.
October 31, 2007 at 9:26 pm
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!!!
Ethan
October 31, 2007 at 10:03 pm
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
November 1, 2007 at 8:35 pm
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.
November 1, 2007 at 8:51 pm
got it working, just removed all the files and re-uploaded. must have been a corrupt file somewhere. thanks
November 1, 2007 at 11:09 pm
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!
November 2, 2007 at 10:17 am
Justen,
Try using the dev version or wait a few days for 4.1 which will be the same
November 2, 2007 at 6:51 pm
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?!)
November 2, 2007 at 8:09 pm
[...] There are still 2 known issues caused by glitches in the WordPress core files. Fixes are discussed here. [...]
November 4, 2007 at 3:17 pm
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:
<?php
require_once(dirname(dirname(__FILE__)).’/wp-config.php’
$debug = 0;
Something I f-ed up perhaps?
November 4, 2007 at 5:55 pm
Marko,
In what you’ve added to the comments above, there is no ; (semi colon) at the end on the require line. You need to add one.
November 6, 2007 at 7:45 am
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:
http://img151.imageshack.us/img151/7077/screenshotfi1.jpg
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.
November 9, 2007 at 6:23 am
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??
Thanks!
November 9, 2007 at 11:41 am
“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.
November 9, 2007 at 7:10 pm
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.
November 9, 2007 at 8:09 pm
Brilliant! I can’t believe I missed that!
Thank you!!
November 14, 2007 at 11:16 am
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.
November 20, 2007 at 12:38 am
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!
November 20, 2007 at 3:45 pm
SSinclair,
You’ll need to edit the code on line 1302 to alter the daily time. Have a read on the PHP.net 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.
November 20, 2007 at 4:29 pm
[...] There are still 2 known issues caused by glitches in the WordPress core files. Fixes are discussed here. [...]
December 1, 2007 at 10:53 pm
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
December 2, 2007 at 10:29 am
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
January 8, 2008 at 8:20 pm
[...] There are still 2 known issues caused by glitches in the WordPress core files. Fixes are discussed here. [...]
January 9, 2008 at 12:43 pm
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 :
<?php
require_once(dirname(dirname(__FILE__)).’/wp-config.php’;
$debug = 0;
January 9, 2008 at 1:18 pm
Captain Gloo,
Make sure you have used plain quotes at the end of the second line.
January 9, 2008 at 1:35 pm
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.
January 16, 2008 at 8:16 pm
[...] There are still 2 known issues caused by glitches in the WordPress core files. Fixes are discussed here. [...]
January 17, 2008 at 2:56 am
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!
Thanks!
Patrick
January 17, 2008 at 9:26 am
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.
January 17, 2008 at 1:43 pm
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?
Thanks
January 17, 2008 at 2:27 pm
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?
January 18, 2008 at 7:17 am
yes, same result.
January 18, 2008 at 7:41 am
Hi, fixed. The solution was to increase paramter memory_limit in php.ini.
regards
January 19, 2008 at 10:11 pm
[...] также обратите внимание на список возможных проблем с версиями плагина для wp [...]
February 24, 2008 at 11:50 pm
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?
thanx
February 26, 2008 at 2:26 pm
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.
March 29, 2008 at 3:59 pm
[...] There is still one known issue caused by a glitch in the WordPress core files. A Fix is discussed here. [...]
April 2, 2008 at 11:03 pm
did anyone have issues with subscribe2 and Swift SMTP ?
April 3, 2008 at 3:35 pm
CC,
I’ve stopped used Swift-SMTP as the WordPress mail system is now much more relaible. Try without Swift-SMTP and see how you get on.
April 7, 2008 at 3:41 pm
Getting a Fatal error when I activate? Anyone else having this problem?
April 7, 2008 at 3:47 pm
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.
April 20, 2008 at 9:49 am
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!
April 20, 2008 at 2:06 pm
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.
April 20, 2008 at 2:37 pm
to be more specific: only the registered subscribers get the e-mail, none of the public subscribers do.
April 20, 2008 at 2:41 pm
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.
April 22, 2008 at 2:10 pm
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?
April 22, 2008 at 7:22 pm
Romancretnik,
I know about this and have fixed it ready for the next version.
April 22, 2008 at 7:29 pm
[...] is still two known issues caused by glitches in the WordPress core files. A fix is discussed here and the second issue (Profile pages) is fixed for WordPress [...]
April 25, 2008 at 6:47 am
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?
Thanks.
April 25, 2008 at 9:39 am
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.
April 25, 2008 at 10:10 am
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…
April 26, 2008 at 11:01 am
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.
April 30, 2008 at 11:55 am
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 : http://liseweb.fr/BLOG//?page_id=160
April 30, 2008 at 8:03 pm
Moyounnet,
You are absolutely right, well spotted and thank you. I’ll get it fixed for the next release.
May 16, 2008 at 1:11 pm
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?
Thanks,
Hristo
May 16, 2008 at 8:14 pm
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.
May 22, 2008 at 8:27 pm
[...] is still two known issues caused by glitches in the WordPress core files. A fix is discussed here and the second issue (Profile pages) is fixed for WordPress [...]
June 10, 2008 at 1:43 pm
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.
June 10, 2008 at 2:18 pm
UncleAndrew,
Upgrade your WordPress to 2.5.1. There was a small bug in the core files that I found and fixed; it was the cause of this issue and is resolved in the latest release.
June 10, 2008 at 2:19 pm
Hoo boy…
…OK, I’ll give that a shot. Thanks!
July 3, 2008 at 4:25 pm
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?
July 3, 2008 at 6:45 pm
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.
July 3, 2008 at 7:23 pm
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.
July 4, 2008 at 12:55 am
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.
July 4, 2008 at 9:21 am
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.
July 6, 2008 at 1:55 am
Ok, I deleted re-downloaded and reinstalled…it activated fine but isn’t showing in the widget panel.
Starting to think it’s what I’m doing. LOL.
July 6, 2008 at 2:40 am
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.
September 3, 2008 at 4:02 am
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
September 3, 2008 at 11:11 am
Fuzzie,
Sounds like a template issue. The confirmation link works like a WordPress page so does your sidebar show up for other pages?
September 4, 2008 at 4:47 pm
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)
September 5, 2008 at 12:18 pm
Johannes,
I have not been able to reproduce this error – what theme are you using?
September 8, 2008 at 4:09 am
Subscriber2 was working beautifully. I upgrade to version 4.9 and it stopped working. Won’t send any notification e-mails.
Thanks,
Karl Davidson
September 8, 2008 at 9:50 am
Karl,
Have you tried reverting to 4.8?
September 8, 2008 at 5:47 pm
I’d love to, but I don’t know how. Where can I read about the process?
Thanks,
Karl Davidson
September 8, 2008 at 7:21 pm
Karl,
Have a read here.
September 9, 2008 at 12:56 am
Should I uninstall 4.9 first?
Karl
September 9, 2008 at 6:06 pm
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
September 9, 2008 at 7:27 pm
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.
September 10, 2008 at 12:58 am
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:
Array
(
[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\’
Thanks,
Karl
September 10, 2008 at 2:03 am
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
September 10, 2008 at 9:38 am
Karl,
There don’t appear to be any problems with your configuration. Can you successfully emails from Write->Mail Subscribers?
September 10, 2008 at 1:49 pm
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
Thanks,
Karl
September 10, 2008 at 2:14 pm
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.
September 10, 2008 at 3:41 pm
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:
http://wordpress.org/support/topic/167606/page/2?replies=90
<?php
$Name = “Da Duder”; //senders name
$email = “rwachs@hostmonster.com”; //senders e-mail adress
$recipient = “rwachs@hostmonster.com”; //recipient
$mail_body = “The text for the mail… from helptheprincipal.com”; //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!!!’;
?>
September 10, 2008 at 11:55 pm
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.
Thanks,
Karl Davidson
September 11, 2008 at 9:36 am
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!
September 11, 2008 at 1:38 pm
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
September 12, 2008 at 9:18 am
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?
November 2, 2008 at 1:28 am
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 =
&get_post($this->subscribe2_options['s2page'])->post_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
Jorge
November 2, 2008 at 1:56 pm
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?