Ticket #1730 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: kikidonk Assigned to: 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 (1.4 kB) - added by corvus on 04/10/08 23:55:52.
Patch to fix error and add email/uri fields

Change History

04/02/08 05:19:18 changed 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?

04/10/08 23:55:13 changed 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.

04/10/08 23:55:52 changed by corvus

  • attachment atom.diff added.

Patch to fix error and add email/uri fields

04/11/08 15:43:17 changed 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.

06/14/08 12:31:55 changed by chrisz

  • status changed from new to closed.
  • resolution set to fixed.

Looks good to me. Applied in r4737.