bitrot
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: Problem with wp_list_categories going into infinite loopHi drmike.
Do you mean the root of my user account or my WP installation? I’ve got a cron.php in the wp-includes folder but nowhere else.
Any chance you could point me to any of the threads you’re referring to? I’ve found this one but it seems to be inconclusive.
I’m getting out of my depth with PHP here and besides I only have FTP access to my host so I can’t do much about inspecting what’s going on there, looking at the PHP installation, or whatever. Any further help will be greatly appreciated!
(I had to chuckle when I saw this on my way in here: More simply, WordPress is what you use when you want to work with your blogging software, not fight it. ??
Forum: Fixing WordPress
In reply to: No email notification on WP 2p.s. Couple of things I forgot to mention:
- You should probably “do the right thing” and get the code to e-mail you in the same character set as your blog. To do this, change the first line above to the following:
$message_headers = "MIME-Version: 1.0\n"
. "From: $admin_email\n"
. "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
- I guessed at the value
comment_moderation_headers
that I’m passing toapply_filters
from looking at other values passed elsewhere. I’ve no idea what it does (if anything at all!) but it doesn’t seem to do any harm. ??
Forum: Fixing WordPress
In reply to: No email notification on WP 2I’ve cracked it! At least, I’ve solved the problem I was having – no e-mail notification when a comment was put into moderation. I hope this works for some of you too.
The problem was on line 401 of wp-include/pluggable-functions.php. It’s the line inside
wp_notify_moderator()
that callswp_mail()
function (with the@
error-supression prefix). The problem is that it doesn’t pass any mail headers to the function, and hence it attempts to send the mail with no “From” address. Some ISPs/hosts will allow this and others won’t, which is why only some people are affected. This occurred to me when I looked at thewp_notify_postauthor()
function further up that same file: on line 359, you’ll see it does pass headers towp_mail()
.So, the solution is to replace line 401, i.e.:
@wp_mail($admin_email, $subject, $notify_message);
with the following:
$message_headers = "MIME-Version: 1.0\n"
. "From: $admin_email\n"
. "Content-Type: text/plain\n";
$message_headers = apply_filters('comment_moderation_headers', $message_headers, $comment_id);
@wp_mail($admin_email, $subject, $notify_message, $message_headers);(I hope that comes out with formatting intact!)
Hope this helps some of you!
Cheers, Mark.Forum: Fixing WordPress
In reply to: No email notification on WP 2I’m getting a related (or possibly the same) issue: I don’t get e-mails when comments are held for moderation, but I DO get an e-mail when I approve and publish the comment (which is helpful ;).
I’m using 2.0.2, with the K2 theme, and I’ve got both e-mail options ticked (…when: “Anyone posts a comment” + “A comment is held for moderation”).
The fact I get the e-mail on publication means sendmail is set up and configured correctly, so the only explanation is a bug in WordPress.
- You should probably “do the right thing” and get the code to e-mail you in the same character set as your blog. To do this, change the first line above to the following: