ATOM feed entry updated timestamp is not set correctly

e.g. http://forums.zotero.org/search.php?PostBackAction=Search&Advanced=1&Type=Comments&Feed=ATOM

all "updated" elements for each entry are set to the current timestamp. I switched to a new RSS reader, which apparently treats these correctly, and now everything is always unread.
  • edited April 25, 2013
    Assuming Zotero uses FeedPublisher to publish these feeds, here's the patch for this issue:

    --- FeedPublisher/default.php 2008-08-10 10:04:47.000000000 -0500
    +++ www/extensions/FeedPublisher/default.php 2013-04-25 02:08:30.528900815 -0500
    @@ -304,8 +304,9 @@
    ."#Comment_" . $Comment->CommentID );
    $Properties[ "Published" ]
    = FixDateForFP( $FeedType, @$Row[ "DateCreated" ] );
    + $dateEdited = @$Row[ "DateEdited" ];
    $Properties[ "Updated" ]
    - = FixDateForFP( $FeedType, @$Row[ "DateEdited" ] );
    + = $dateEdited ? FixDateForFP( $FeedType, $dateEdited ) : $Properties[ "Published" ];
    $Properties[ "AuthorName" ]
    = $Comment->AuthUsername;
    $Properties[ "AuthorUrl" ]


    --- vanilla-1.1.5a/library/Vanilla/Vanilla.Class.CommentManager.php 2008-09-24 17:22:14.000000000 -0500
    +++ www/library/Vanilla/Vanilla.Class.CommentManager.php 2013-04-25 02:09:45.543957747 -0500
    @@ -220,7 +220,7 @@ class CommentManager extends Delegation
    $s->AddJoin('CategoryRoleBlock', 'crb', 'CategoryID', 'd', 'CategoryID', 'left join', ' and crb.'.$this->Context->DatabaseColumns['CategoryRoleBlock']['RoleID'].' = 1');
    }

    - $s->AddSelect(array('CommentID', 'DiscussionID', 'Body', 'FormatType', 'DateCreated', 'Deleted', 'AuthUserID', 'WhisperUserID'), 'c');
    + $s->AddSelect(array('CommentID', 'DiscussionID', 'Body', 'FormatType', 'DateCreated', 'DateEdited', 'Deleted', 'AuthUserID', 'WhisperUserID'), 'c');
    $s->AddSelect('Name', 'a', 'AuthUsername');
    $s->AddSelect('WhisperUserID', 'd', 'DiscussionWhisperUserID');
    $s->AddSelect('Name', 'w', 'WhisperUsername');
  • So $Row[ "DateEdited" ] is just always empty right now?
  • Correct. It is not being selected for displaying search results (though maybe search results should be sorted by modified date?), which is what the ATOM/RSS feed uses.
  • Talking about modified timestamps... bump? :-)
Sign In or Register to comment.