Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#11421 closed defect (bug) (fixed)

Comment Feed Dates All Wrong

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

Description

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 3 years ago.
Adds $translate parameter to the get_comment_time() filter.
ticket-11421-qtranslate.patch (2.3 KB) - added by miqrogroove 3 years ago.
Filter handling for qTranslate (for plugin)

Download all attachments as: .zip

Change History (15)

So far I've ruled out:

Errors/Warnings.
Post feed symptoms.
qTranslate activation.
Database corruption.
Clean install symptoms.

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

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....

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()) ?>

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.

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.

  • 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().

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.

feed-atom.php was missed as well

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.

Adds $translate parameter to the get_comment_time() filter.

Filter handling for qTranslate (for plugin)

  • Keywords has-patch tested added; needs-patch removed
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [12396].

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

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.