Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#11421 closed defect (bug) (fixed)

Comment Feed Dates All Wrong

Reported by: miqrogroove's profile miqrogroove Owned by:
Milestone: 2.9 Priority: high
Severity: normal Version: 2.8.4
Component: Feeds Keywords: has-patch tested
Focuses: Cc:


I realize 2.9 is almost out the door, but I'm hoping to pin down whether this is a core bug or something going on with a plugin ASAP.

When I hit /comments/feed/ on my site, the comments appear in the correct order, but every one of the pubDate values begins with "Sun, 13 Dec 2009" and I'm certain none of the listed comments were added today.

Attachments (2)

ticket-11421-comment-template.patch (529 bytes) - added by miqrogroove 14 years ago.
Adds $translate parameter to the get_comment_time() filter.
ticket-11421-qtranslate.patch (2.3 KB) - added by miqrogroove 14 years ago.
Filter handling for qTranslate (for plugin)

Download all attachments as: .zip

Change History (15)

#1 @miqrogroove
14 years ago

So far I've ruled out:

Post feed symptoms.
qTranslate activation.
Database corruption.
Clean install symptoms.

This is going to be trickier to find than I had hoped.

#2 @miqrogroove
14 years ago

get_comment_time('Y-m-d H:i:s', true, false)
returns string(8) "06:42 PM"

Starting to look like a filter or plugin issue. What I need to know now is why it affects the comment feed and not the post feed....

#3 @miqrogroove
14 years ago

class Walker_Comment uses a completely different syntax for date output. That at least explains why my themes are working when the feed is not.

<?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?>

#4 @miqrogroove
14 years ago

This discrepancy is my primary suspect now:

get_comment_time('Y-m-d H:i:s', true, false)
get_post_time('Y-m-d H:i:s', true)

The post feed and comment feed are not using the "translate" parameters consistently.

#5 @miqrogroove
14 years ago

I was able to reproduce the bug in a test environment using the qTranslate "Date / Time Conversion" setting.

I still haven't ruled out the "translate" parameter as a possible cause though.

#6 @miqrogroove
14 years ago

  • Keywords needs-patch added; needs-testing removed

It looks like qTranslate needs to hook get_comment_time() because it is being used in Walker_Comment for template output. get_post_time() is not used in that manner, so it is not hooked.

I'll get started on a patch to add date and time filters to Walker_Comment:start_el().

#7 @miqrogroove
14 years ago

Now I'm thinking there was a mistake in #9730. 11323? missed the call(s) to get_post_time.

If we could get that straight and then add the $translate parameter to the existing filters, I think that would take care of it.

#9 @miqrogroove
14 years ago

feed-atom.php was missed as well

#10 @miqrogroove
14 years ago

These functions don't even have the same defaults?! *shakes head and stares at the screen blankly*

One of the calls inside start_el() has to be wrong then. Holy hell this is confusing.

14 years ago

Adds $translate parameter to the get_comment_time() filter.

14 years ago

Filter handling for qTranslate (for plugin)

#11 @miqrogroove
14 years ago

  • Keywords has-patch tested added; needs-patch removed

#12 @azaozz
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [12396].

Perhaps sent the patch for qTranslate to the plugin's author.

#13 @miqrogroove
14 years ago

I suspect he's on vacation until 2.9 is released. I did make a note in his forum but he has been flooded with posts about 2.8. Without a proper ticket system I'm afraid it's hard to flag a proper bug among all the support questions.

Note: See TracTickets for help on using tickets.