WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#11421 closed defect (bug) (fixed)

Comment Feed Dates All Wrong

Reported by: miqrogroove Owned by:
Milestone: 2.9 Priority: high
Severity: normal Version: 2.8.4
Component: Feeds Keywords: has-patch tested
Focuses: 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 4 years ago.
Adds $translate parameter to the get_comment_time() filter.
ticket-11421-qtranslate.patch (2.3 KB) - added by miqrogroove 4 years ago.
Filter handling for qTranslate (for plugin)

Download all attachments as: .zip

Change History (15)

comment:1 miqrogroove4 years ago

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.

comment:2 miqrogroove4 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....

comment:3 miqrogroove4 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()) ?>

comment:4 miqrogroove4 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.

comment:5 miqrogroove4 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.

comment:6 miqrogroove4 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().

comment:7 miqrogroove4 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.

comment:9 miqrogroove4 years ago

feed-atom.php was missed as well

comment:10 miqrogroove4 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.

miqrogroove4 years ago

Adds $translate parameter to the get_comment_time() filter.

miqrogroove4 years ago

Filter handling for qTranslate (for plugin)

comment:11 miqrogroove4 years ago

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

comment:12 azaozz4 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.

comment:13 miqrogroove4 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.