Ticket #1730 (closed defect: fixed)
[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
Change History
comment:2 Changed 4 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 4 years ago by corvus
-
attachment
atom.diff
added
Patch to fix error and add email/uri fields
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?