You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But because in this line the link from the loop gets overwritten, all the subsequent gets do nothing.
Changing the code back to this, fixes our problem.
for l in self.__atom_link or []:
link = xml_elem('link', entry, href=l['href'])
if l.get('rel'):
link.attrib['rel'] = l['rel']
if l.get('type'):
link.attrib['type'] = l['type']
if l.get('hreflang'):
link.attrib['hreflang'] = l['hreflang']
if l.get('title'):
link.attrib['title'] = l['title']
if l.get('length'):
link.attrib['length'] = l['length']
Recently ran into this issue as well, when using both FeedEntry.link and FeedEntry.enclosure in the same entry for embedding the link to my blog post and the cover image respectively caused the generated Atom XML string to fail W3C Atom 1.0 validation tests indicating that a single Atom entry cannot have two links with rel="alternate" simultaneously.
I've removed all images from my feed for the time being as a workaround, but would love to see it fixed so I may start including images again in my feed entries.
I just found this as well, and I will just add that the documentation states the following:
rel contains a single link relationship type. It can be a full URI, or one of the following predefined values (default=alternate)
This, however, is not really true as the rel tag doesn't get added to the link in the feed. Some RSS feed readers explicitly check to see if rel='alternate' is set before deciding what to do. In particular, for the Mattermost RSSfeed plugin, these links are simply discarded.
Activity
[-]atom_link gets overwritten by xml_elem[/-][+]Only href gets rendered for links[/+]fix entry links attributes writing to file lkiesow#135
DonaldKellett commentedon Feb 15, 2024
Recently ran into this issue as well, when using both
FeedEntry.linkandFeedEntry.enclosurein the same entry for embedding the link to my blog post and the cover image respectively caused the generated Atom XML string to fail W3C Atom 1.0 validation tests indicating that a single Atom entry cannot have two links withrel="alternate"simultaneously.I've removed all images from my feed for the time being as a workaround, but would love to see it fixed so I may start including images again in my feed entries.
ldotlopez commentedon May 10, 2024
I just stumbled upon this bug, no updates on the PR?
Ignore feedgen 1.0.0
Merge branch 'bugfix/issue-135-invalid-link-rendering'
MarkWieczorek commentedon Sep 18, 2026
I just found this as well, and I will just add that the documentation states the following:
This, however, is not really true as the rel tag doesn't get added to the link in the feed. Some RSS feed readers explicitly check to see if rel='alternate' is set before deciding what to do. In particular, for the Mattermost RSSfeed plugin, these links are simply discarded.