00977: Web Feeds bug when $RecentChangesFmt changed

Summary: Web Feeds bug when $RecentChangesFmt changed
Created: 2007-09-19 12:38
Status: Open
Category: Bug
From: Diafygi
Assigned:
Priority: 3
Version: 2.2.0-beta62
OS: Linux/Apache/5

Description: As described in the email list and Cookbook.AllRecentChanges, I changed my $RecentChangesFmt variable to show all changes to all pages, not just the most recent change to each page. Code I used:

$RecentChangesFmt = array(
  '$SiteGroup.AllRecentChanges' =>
    '* [[$Group.$Name]] . . . $CurrentTime  $[by] $AuthorLink: [=$ChangeSummary=]',
  '$Group.RecentChanges' =>    
    '* [[$Group/$Name]] . . . $CurrentTime  $[by] $AuthorLink: [=$ChangeSummary=]');

Also, I changed the web feeds/rss/atom variable $FeedFmt to a custom format as. Code I used:

$FeedFmt['rss']['item']['title'] = '{$Group} / {$Title} : $LastModifiedSummary';
$FeedFmt['rss']['item']['description'] = 'Changes made by: $LastModifiedBy';

The bug occurs when multiple changes are made to a single page. The Site.AllRecentChanges and Group.RecentChanges displays the updated changes just fine. However, the RSS feed for the site and group show only the most recent summary for all of the changes.

For example:

  • Pete edits Main.InfoPage at 10:20am, with the summary 'foo'
  • Bill edits Main.InfoPage at 10:40am, with the summary 'woot'
  • Steve edits Main.InfoPage at 11:00am, with the summary 'blah'
  • The RSS web feed will show the following:
    Main / InfoPage : blah #2
       11:00 AM
       Changes made by: Steve.
    
    Main / InfoPage : blah #1
       11:00 AM
       Changes made by: Steve
    
    Main / InfoPage : blah
       11:00 AM
       Changes made by: Steve
    ...

This is because the $LastModifiedSummary and $LastModifiedBy variables only look at the most recent summary and author. If I change these variables to the ones used in the custom $RecentChangesFmt array ($ChangeSummary and $AuthorLink), the output will be nothing for $ChangeSummary and a question mark ('?') for $AuthorLink. I assume the numbering is a feature of the feeds.php script for duplicate changes.

Why can't I use $ChangeSummary and $AuthorLink instead of LastModifiedSummary and $LastModifiedBy in the $FeedFmt array? Why does the time of the web feed only show the most recent time? How can a make the RSS feed display correctly like the AllRecentChanges page?