Notification Emails Not Send After Comment Approval in WordPress 2.5 and 2.5.1 Les messages de notification d'envoyer un commentaire Après approbation dans WordPress 2.5 et 2.5.1
In Dans WordPress 2.5 WordPress 2.5 and et Wordpress 2.5.1 Wordpress 2.5.1 , when the option is set to email post author whenever a comment is posted (comments_notify = 1), no notification email is generated or sent to notify the post author if the comment is held in moderation queue and is only approved later via edit-comments.php. , Lorsque l'option est définie à l'e-mail après l'auteur à chaque fois qu'un commentaire est posté (comments_notify = 1), aucun e-mail de notification est produite ou envoyée à notifier à l'auteur de poste si le commentaire est tenue en file d'attente de modération et seulement est approuvé ultérieurement par voie d'edit-commentaires . php.
Prior to WordPress 2.5, an email is sent on approval to post author even if a comment is required to be approved and not posted instantly. Avant de WordPress 2.5, un courriel est envoyé sur l'approbation de post auteur, même si un commentaire est nécessaire pour être approuvés et pas affiché instantanément. However, notification that a comment is held for moderation and require administrator’s action to approve, delete or spam the message is working properly, with email sends to administrator’s email address (admin_email), not post author. Toutefois, la notification qui est un commentaire qui s'est tenue à la modération et à exiger de l'administrateur de l'action à approuver, ou supprimer le message spam fonctionne correctement, avec le courrier électronique envoie à l'administrateur de l'adresse e-mail (admin_email), pas de message auteur.
It’sa bug that has been introduced in WordPress 2.5, and slips into WordPress 2.5.1 when moderation.php functionality was moved into edit-comments.php. Il s'agit d'un bug qui a été introduit dans WordPress 2.5, et se glisse dans WordPress 2.5.1 lorsque moderation.php fonctionnalité a été déplacée dans edit-comments.php. The bug will probably be fixed in WordPress 2.5.2 release. Le problème sera probablement fixé dans WordPress 2.5.2 release. If you can’t wait, simply edit wp-includes/comment.php on WordPress blog directory on web server, and add the following lines of code: Si vous ne pouvez pas attendre, il vous suffit de modifier wp-includes/comment.php sur WordPress blog annuaire sur serveur web, et ajouter les lignes suivantes de code:
Before: Avant:
break;
case 'approve':
$query = $wpdb->prepare("UPDATE $wpdb->comments SET comment_approved='1' WHERE comment_ID = %d LIMIT 1", $comment_id);
break;
case 'spam':
$query = $wpdb->prepare("UPDATE $wpdb->comments SET comment_approved='spam' WHERE comment_ID = %d LIMIT 1", $comment_id);
After: Après:
break;
case 'approve':
$query = $wpdb->prepare("UPDATE $wpdb->comments SET comment_approved='1' WHERE comment_ID = %d LIMIT 1", $comment_id);
if ( get_option( 'comments_notify' ) == true ) {
wp_notify_postauthor( $comment );
}
break;
case 'spam':
$query = $wpdb->prepare("UPDATE $wpdb->comments SET comment_approved='spam' WHERE comment_ID = %d LIMIT 1", $comment_id);
IMPORTANT : You're reading a machine translated page which is provided "as is" without warranty. IMPORTANT: Vous lisez une machine qui traduit la page est fourni "tel quel" sans garantie. Unlike human translation, machine translation does not understand the grammar, semantics, syntax, idioms of natural language, thus often produce inaccurate and low quality text which is misleading and incomprehensible. Contrairement à la traduction humaine, traduction automatique ne comprend pas la grammaire, sémantique, la syntaxe, idiomes du langage naturel, ce qui produit souvent inexacts et la faible qualité du texte qui est trompeur et incompréhensible. Thus, please refer to Ainsi, s'il vous plaît se référer à original English article article original en anglais when in doubt. en cas de doute.
Related Articles Related Articles
- WordPress 2.5.1 Released for Download Paru WordPress 2.5.1 à télécharger
- Call to Undefined Function: wp_constrain_dimensions() When Uploading Images or image_downsize() in Gallery/Media Library in WordPress 2.5 Appel à l'Undefined Fonction: wp_constrain_dimensions () lors du téléchargement d'images ou image_downsize () dans la Galerie / Médiathèque dans WordPress 2.5
- Fix WordPress 2.5 Image or Media Flash Uploader Not Working Issue in IE7 WordPress 2.5 Fix image ou Flash Media Uploader ne fonctionne pas question dans IE7
- WordPress 2.5 RC2 Released for Download WordPress 2.5 RC2 à télécharger Paru
- Call To Undefined Function: ctype_digit() in WordPress 2.5 Call To Undefined Fonction: ctype_digit () dans WordPress 2.5
- Make WordPress Blog More Secure Using Secret Key Faites blog wordpress plus sûr en utilisant la clé secrète
- PHP Fatal Error on Call to Add_Query_Var in Taxonomy.php After Upgrading to WordPress 2.5 RC2 PHP Fatal Error à l'appel à Add_Query_Var dans Taxonomy.php Après la mise à jour vers WordPress 2.5 RC2
- Contact
- WordPress 2.5 Released for Free Download Paru WordPress 2.5 en téléchargement gratuit
- Workaround to Override WordPress Shortcode and Display the [] Brackets Tags Ignorer la solution de WordPress à court et à afficher les crochets [] Tags

































June 20th, 2008 11:29 Juin 20 Juillet 2008 11h29
Hello, Bonjour,
The code you printed under ‘before’ is different in that the one in wp-includes/comment.php. Le code que vous avez imprimée sous la rubrique «avant» est différente en ce sens que celui de wp-includes/comment.php. This is the code in comment.php: Il s'agit du code dans comment.php:
case 'approve':$query = "UPDATE $wpdb->comments SET comment_approved='1' WHERE comment_ID='$comment_id' LIMIT 1";
break;
case 'spam':
$query = "UPDATE $wpdb->comments SET comment_approved='spam' WHERE comment_ID='$comment_id' LIMIT 1";
Which version of WP did you get that code from? Quelle version de WP vous êtes-vous de ce code?
June 20th, 2008 11:53 Juin 20 Juillet 2008 11h53
version 2.5. version 2.5.
June 20th, 2008 11:57 Juin 20 Juillet 2008 11h57
Hi, Salut,
The code I posted is from 2.5.1. Le code que j'ai affiché est de 2.5.1. Do you think that replacing this code with the one you posted could fix this issue? Pensez-vous que le remplacement de ce code avec celui que vous avez affiché pourrait résoudre ce problème?
June 20th, 2008 12:28 Juin 20 Juillet 2008 12h28
Try to just add in the additional lines (the difference). Essayez de vous ajoutez à la des lignes supplémentaires (la différence).
June 27th, 2008 20:49 27 juin 2008 20:49
Hello, Bonjour,
Tried it. Essayé. It did not work. Cela n'a pas fonctionné. Thanks anyways. Merci de toute façon.
July 11th, 2008 17:30 Juillet 11, 2008 17:30
Thanks for the post ‘admin’ - I help manage a (non?)corporate blog, and my boss stopped getting email notifications since upgrading to 2.5.x - I do believe your suggested patch has fixed it. Merci pour le poste 'admin' - je faire pour contribuer à la gestion d'un (non?) Corporate blog, et mon patron cessé de faire des notifications par courrier électronique depuis la mise à niveau vers 2.5.x - Je ne crois que votre patch a suggéré qu'il fixe.
So, again thanks very much! Donc, encore une fois merci beaucoup!
September 4th, 2008 04:15 4 septembre 2008 04:15
This WPMU behavior was driving me a bit nuts. WPMU Ce comportement a été conduite moi un peu de noix. Much thanks for sharing your solution! Mille mercis pour le partage de votre solution!
September 22nd, 2008 05:42 22 septembre, 2008 05:42
Wow Cool ! Wow Cool!
Super Man Super Man
Nice Site Nice site
October 15th, 2008 07:26 15 octobre 2008 07:26
In 2.6.1 it should look as this: En 2.6.1 il devrait ressembler comme ceci:
case 'approve':
$query = $wpdb->prepare("UPDATE wpdb->comments SET comment_approved='1' WHERE comment_ID = %d LIMIT 1", $comment_id);
if ( get_option('comments_notify') == true ) {
$comment = get_comment($comment_id);
wp_notify_postauthor($comment_id, $comment->comment_type);
}
The only change is adding: Le seul changement est d'ajouter:
== true