Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1730 (closed defect: fixed)

Opened 10 years ago

Last modified 9 years ago

[PATCH] FeedController atom1_0.kid template doesn't include proper author

Reported by: kikidonk Owned by: anonymous
Priority: normal Milestone: 1.0.x bugfix
Component: TurboGears Version: 1.0.4.3
Severity: normal Keywords:
Cc:

Description

In line 25 of feed/atom1_0.kid:

<author py:if="entry.has_key('author')">
   <name py:content="author['name']">name</name>
</author>

The name used for an entry author is wrong. It checks for an entry author, but uses the global feed author. It should read:

<author py:if="entry.has_key('author')">
   <name py:content="entry['author']['name']">name</name>
</author>

Attachments

atom.diff Download (1.4 KB) - added by corvus 10 years ago.
Patch to fix error and add email/uri fields

Change History

comment:1 Changed 10 years ago by poeml

This bug is also present in 1.0.4.4.

I just found it and came to the same fix.

Any help that I can provide with checking the fix in?

comment:2 Changed 10 years ago by corvus

  • Milestone changed from 1.1 to 1.0.x bugfix

This problem can be worse than originally stated -- if the feed has no author (like a multi-author blog), then the 'author' won't be defined in that scope, and so rendering the template for the atom1.0 feed produces a NameError?.

Atom 1.0 also supports the email and uri elements, like atom 0.3, but TG doesn't include them in the feed for 1.0 though they are in 0.3. I'm attaching a patch that fixes the error and brings the email/uri elements in line with the 0.3 template.

This is a simple problem to fix that has a big impact, it would be nice if it could be fixed in the 1.0 series.

Changed 10 years ago by corvus

Patch to fix error and add email/uri fields

comment:3 Changed 10 years ago by corvus

  • Summary changed from FeedController atom1_0.kid template doesn't include proper author to [PATCH] FeedController atom1_0.kid template doesn't include proper author

comment:4 Changed 9 years ago by chrisz

  • Status changed from new to closed
  • Resolution set to fixed

Looks good to me. Applied in r4737.

Note: See TracTickets for help on using tickets.