Forum

Thread tagged as: Problem, Blog

RSS Feed Not Retrieving Author Name

I have an RSS fee set up for a blog. The feed validates, but the xml tag for the author name is blank unless I go into the meta and social section and save(without changing anything). If I then validate the feed again the author name pulls through.

Creative Monster

Creative Monster 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show us the code you're using?

This could be related to a bug we're aware of with the author field, but it may be something else.

Sure, here's rss.php:

<?php include($_SERVER['DOCUMENT_ROOT'].'/admin/runtime.php'); ?>
<?php header("Content-Type: application/rss+xml"); ?>
<?php echo '<'.'?xml version="1.0"?'.'>'; ?>
<rss version="2.0" xmlns:atom="https://www.w3.org/2005/Atom" xmlns:dc="https://purl.org/dc/elements/1.1/">
<channel>
  <title>Valery Collins - Travel Writer</title>
  <link>https://valery-collins.co.uk/blog/</link>
  <description>The latest writings of Valery Collins</description>
  <?php
    $opts = array(
      'template'    => '_rss_item.html',
      'sort'        => 'postDateTime',
      'sort-order'  => 'DESC'
    );
    perch_blog_custom($opts);
  ?>
</channel>
</rss>

and here's _rss_item.html

<item>
  <title><perch:blog id="postTitle" type="text" label="Title" /></title>
  <link>https://valery-collins.co.uk<perch:blog id="postURL"/></link>

  <description>
    <![CDATA[
      <perch:blog id="excerpt" type="textarea" label="Excerpt" />
    ]]>
  </description>

  <pubDate>
    <perch:blog id="postDateTime" type="date" format="D, d M Y H:i:s O" time="true" label="Date" />
  </pubDate>

  <dc:creator>
    <perch:blog id="authorGivenName" type="text" /> <perch:blog id="authorFamilyName" type="text" />
  </dc:creator>
</item>
Drew McLellan

Drew McLellan 2638 points
Perch Support

That looks like it should be ok, so it could be related to this bug. I'll investigate.

Okay, thanks Drew.