Debian Bug report logs - #428844
Last-modified header on comments feed is updated before comments are approved

version graph

Package: wordpress; Maintainer for wordpress is Craig Small <csmall@debian.org>; Source for wordpress is src:wordpress.

Reported by: James Ballantine <james@ballantine.com.au>

Date: Thu, 14 Jun 2007 15:42:01 UTC

Severity: normal

Tags: fixed-upstream

Found in version wordpress/2.0.10-1

Done: "Andrea De Iacovo" <andrea.de.iacovo@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Kai Hendry <hendry@iki.fi>:
Bug#428844; Package wordpress. Full text and rfc822 format available.

Acknowledgement sent to James Ballantine <james@ballantine.com.au>:
New Bug report received and forwarded. Copy sent to Kai Hendry <hendry@iki.fi>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: James Ballantine <james@ballantine.com.au>
To: submit@bugs.debian.org
Subject: Last-modified header on comments feed is updated before comments are approved
Date: Fri, 15 Jun 2007 01:37:10 +1000
[Message part 1 (text/plain, inline)]
Package: wordpress
Version: 2.0.10-1

When a comment is submitted to a post and goes into 'pending moderator 
approval' status, the Last-Modifed and ETag HTTP headers on the Comments 
RSS feed are updated as if there is already new content in this feed.

Later, when the comment is approved, the headers are not updated again. 
This means that some RSS readers (eg: Liferea) do not notice the 
newly-approved comment, since they won't re-fetch a feed unless its 
headers say there is something new.

A suggested patch is attached to this email (I'm not sure if that's the 
right way to submit patches - sorry if it isn't).

I am running Debian GNU/Linux 4.0.

Thanks,
James
[wordpress-fix-rss-modification-times.diff (text/plain, inline)]
diff -ur wordpress/wp-includes/comment-functions.php wordpress-mod/wp-includes/comment-functions.php
--- wordpress/wp-includes/comment-functions.php	2007-03-26 09:12:38.000000000 +1000
+++ wordpress-mod/wp-includes/comment-functions.php	2007-06-15 01:04:50.000000000 +1000
@@ -549,13 +549,13 @@
 	if ( !isset($cache_lastcommentmodified[$timezone]) ) {
 		switch(strtolower($timezone)) {
 			case 'gmt':
-				$lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");
+				$lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_date_gmt <= '$now' AND comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
 				break;
 			case 'blog':
-				$lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");
+				$lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_date_gmt <= '$now' AND comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
 				break;
 			case 'server':
-				$lastcommentmodified = $wpdb->get_var("SELECT DATE_ADD(comment_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");
+				$lastcommentmodified = $wpdb->get_var("SELECT DATE_ADD(comment_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->comments WHERE comment_date_gmt <= '$now' AND comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
 				break;
 		}
 		$cache_lastcommentmodified[$timezone] = $lastcommentmodified;

Information forwarded to debian-bugs-dist@lists.debian.org, Kai Hendry <hendry@iki.fi>:
Bug#428844; Package wordpress. Full text and rfc822 format available.

Acknowledgement sent to hendry@iki.fi:
Extra info received and forwarded to list. Copy sent to Kai Hendry <hendry@iki.fi>. Full text and rfc822 format available.

Message #10 received at 428844@bugs.debian.org (full text, mbox):

From: "Kai Hendry" <kai.hendry@gmail.com>
To: 428844@bugs.debian.org
Subject: Pushed upstream
Date: Tue, 24 Jul 2007 19:44:14 +0100
http://trac.wordpress.org/ticket/4618



Tags added: fixed-upstream Request was from "Kai Hendry" <kai.hendry@gmail.com> to control@bugs.debian.org. (Mon, 06 Aug 2007 12:15:06 GMT) Full text and rfc822 format available.

Reply sent to "Andrea De Iacovo" <andrea.de.iacovo@gmail.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to James Ballantine <james@ballantine.com.au>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #17 received at 428844-done@bugs.debian.org (full text, mbox):

From: "Andrea De Iacovo" <andrea.de.iacovo@gmail.com>
To: 428844-done@bugs.debian.org
Date: Tue, 29 Apr 2008 00:08:01 +0200
We can definitely consider this bug closed.

Thank you for reporting.

Andrea
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIFkq3MXahCK22/rwRAlztAJ9JzKEmFVw/eyxhF3WouW3vorxpyQCcCEgx
FV0HjQ3OH71KzWYvRmCWKuw=
=sQTd
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 27 May 2008 07:30:58 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 08:27:32 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.