ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Custom fields not populating in RSS

January 11, 2013 4:24pm

Subscribe [2]
  • #1 / Jan 11, 2013 4:24pm

    Noob-EE

    1 posts

    Hello, I’m a frontend web guy who, through company turnover, now finds himself doing backend development. Suffice to say, I end up blindly crashing around templates and banging on things until they work.

    Now I find myself trying to set up an xml feed for itunes, and all is going well except that the custom fields from my new “podcast” channel are not populating in the RSS template. I did a search and found an old post with a similar problem, but I don’t understand the solution (something about encoding the file).

    Here’s the template:

    {preload_replace:master_channel_name="podcast"}
    {exp:rss:feed channel="{master_channel_name}"}
    
    <?xml version="1.0" encoding="{encoding}"?>
    <rss versi
     xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:c>
    
    
    
    <channel>
    
    <title>{channel_name}</title>
    
    <link>"http://www.mediacompany.com"<link>
    
    <language>en-us</language>
    
    <copyright>{podcast_copyright}</copyright>
    
    <itunes:subtitle>Podcasts at Company</itunes:subtitle>
    
    <itunes:author>{podcast_author}</itunes:author>
    
    <itunes:summary>{channel_name}</itunes:summary>
    
    <description>{podcast_short_description}</description>
    
    <itunes:owner>
    
    <itunes:name>Web</itunes:name>
    
    <itunes:email>[email protected]</itunes:email>
    
    </itunes:owner>
    
    <itunes:image href="/podcasts/{podcast_poster}" >
    
    <itunes:category text="Technology">
    
    <itunes:category text="Gadgets">
    
    </itunes:category>
    
    <itunes:category text="TV & Film">
    
    {exp:channel:entries channel="{master_channel_name}" limit="10" rdf="off" dynamic_start="on" disable="member_data|trackbacks"}
    <item>
    
    <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
    
    <itunes:author>{podcast_author}</itunes:author>
    
    <itunes:subtitle>{podcast_subtitle}</itunes:subtitle>
    
    <itunes:summary>{podcast_description}</itunes:summary>
    
    <itunes:image href="/podcasts/{podcast_poster}" >
    
    <enclosure url="/podcasts/{podcast_file}" length="{podcast_length}" type="audio/x-mp3" >
    
    <guid>/podcasts/{podcast_file}</guid>
    
    {podcast_date}</pubDate>
    
    <itunes:duration>{podcast_length}</itunes:duration>
    
    <itunes:keywords>{podcast_keywords}</itunes:keywords>
    
    </item>
    
    </channel>
    </rss>
    
    {/exp:rss:feed}

    Oddly enough, {channel_name} populates (used it in a few fields to test), but nothing else does.

    Am I just missing something really easy? Thanks so much for the help.

  • #2 / Jan 21, 2013 10:18am

    smartpill

    456 posts

    I don’t see the closing channel:entries tag in your code. Make sure:

    {/exp:channel:entries}
    is right before the closing
    </channel>
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases