[wp-trac] [WordPress Trac] #36126: lastBuildDate in comment feed may not be empty

WordPress Trac noreply at wordpress.org
Mon May 2 19:12:38 UTC 2016


#36126: lastBuildDate in comment feed may not be empty
--------------------------+------------------------------
 Reporter:  Cybr          |       Owner:  stevenkword
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Feeds         |     Version:  4.4.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by stevenkword):

 Replying to [comment:10 Cybr]:
 > Why not something more simple and right to the point?
 >
 > e.g.:
 > {{{#!php
 > <?php if ( $last_build_date = get_lastcommentmodified('GMT') ) : ?>
 >       <lastBuildDate><?php echo mysql2date('r', $last_build_date);
 ?></lastBuildDate>
 > <?php endif; ?>
 > }}}
 >
 > I'm unsure about the maintainability, though.

 I'm not a huge fan of introducing new logic at the template level.  Test
 coverage for Feeds is already minimal and doing so would make future
 testing more difficult.  In addition, I feel like we should always render
 the tag.  The feed is always "built" and should therefore always have that
 tag.  I see that it's optional according to spec, but in this case, I
 think we need to render it and for it to be accurate.  This is why I want
 to revisit #4575 -- it not only ensures this lastBuildDate wouldn't be
 empty, but it would ensure it was correct.

 In other words -- rather than just specifically put a band-aid on this
 problem -- we should fix the feed behavior.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36126#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list