We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

feed_enclosures not rendering custom field containing mp3

Development and Programming

mmcclung's avatar
mmcclung
172 posts
17 years ago
mmcclung's avatar mmcclung

Uggh. Must be something stupid, everything but the mp3 renders in the resulting XML.

{exp:weblog:entries weblog="{master_weblog_name}" rdf="off" dynamic_start="on" category="7" disable="member_data|trackbacks"}
    <item>
      <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
      <link>{title_permalink=site/comments}</link>
      <guid>{title_permalink=site/comments}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
      <description>{exp:xml_encode}{exp:html_strip}{podcast_summary}{/exp:html_strip}{/exp:xml_encode}</description>
      <dc:subject>{exp:xml_encode}{title}{/exp:xml_encode}</dc:subject>
        {exp:feed_enclosures type="rss"}{podcast_file}{/exp:feed_enclosures}
      <dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
    </item>
{/exp:weblog:entries}
<item>
      <title>Podcast Extra: Madonna’s New Album</title>
      <link>http://www.mysite.com/index.php/site/comments/podcast_music_review/</link>
      <guid>http://www.mysite.com/index.php/site/comments/podcast_music_review/#When:00:18:00Z</guid>
      <description>Lorem ipsum dolor sit</description>
      <dc:subject>Podcast Extra: Madonna’s New Album</dc:subject>
        
      <dc:date>2008-04-29T00:18:00+00:00</dc:date>
    </item>

See that big blank space between subject and date? What am I missing?

The custom field value is ‘https://ellislab.com/asset/images/ent-partner-logo/080429_Hard_Candy_Madonna.mp3’

ExpressionEngine 1.6.3 - 20080319

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
17 years ago
Ingmar Greil's avatar Ingmar Greil

What does {podcast_file} contain? What formatting do you use?

       
mmcclung's avatar
mmcclung
172 posts
17 years ago
mmcclung's avatar mmcclung

see edit above. it contains

https://ellislab.com/asset/images/ent-partner-logo/080429_Hard_Candy_Madonna.mp3

Encoding is ‘None’.

       
Simon Job's avatar
Simon Job
123 posts
17 years ago
Simon Job's avatar Simon Job

I can’t remember if this happens in RSS feeds, but maybe EE is turning the URL into a link. Is the setting “Automatically turn URLs and email addresses into links?” turned off for this weblog?

You find the setting under CP Home > Admin > Weblog Administration > Weblog Management > Edit Preferences

Oh, and the URL does link to an existing file right?

       
mmcclung's avatar
mmcclung
172 posts
17 years ago
mmcclung's avatar mmcclung

:(

that’s already turned off…

       
Simon Job's avatar
Simon Job
123 posts
17 years ago
Simon Job's avatar Simon Job

Can you link to a normal template page that contains {podcast_file} or show us the output?

       
mmcclung's avatar
mmcclung
172 posts
17 years ago
mmcclung's avatar mmcclung

yeah, i could run that up if you like, but it’s already working on the Comments page, so I know the mp3 plays:

<h2 class="title2">{title}</a></h2>
{podcast_summary}
<a href="http://{podcast_file}">{podcast_title}</a>
       
Simon Job's avatar
Simon Job
123 posts
17 years ago
Simon Job's avatar Simon Job

I think you need to add parse_list to the feed_enclosures tag, e.g.

{exp:feed_enclosures type="rss" parse_list="y"}

From the instructions:

parse_list - (y/n) If set to ‘y’, it will only look for a list of URLs separated by commas or line breaks and will not parse out links. If set to ‘n’ (default), it will look through tag’s data looking for all links using the rel=”enclosure” attribute.

As the default is “n”, you need to set to “y” as you’re giving it an MP3 link.

       
mmcclung's avatar
mmcclung
172 posts
17 years ago
mmcclung's avatar mmcclung

hmm, will try that.

the documentation reads as though parse_list=yes is only required for list of multiple links

       
Simon Job's avatar
Simon Job
123 posts
17 years ago
Simon Job's avatar Simon Job

When set to “n”, the plugin looks through a chunk of text… e.g.

The quick brown fox jumped.

Whereas with “y” it’s looking for standalone URLs, even just 1 in a list.

       
mmcclung's avatar
mmcclung
172 posts
17 years ago
mmcclung's avatar mmcclung

yuk.

that results in an ugly error:

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/mysite/public_html/system/plugins/pi.feed_enclosures.php on line 267

eta- edited path

       
Simon Job's avatar
Simon Job
123 posts
17 years ago
Simon Job's avatar Simon Job

I’m no expert, but that looks like a server configuration that doesn’t fit with feed_enclosures.

Yep, looking through the forums found this thread: problem with enclosures in rss feeds

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
17 years ago
Robin Sowell's avatar Robin Sowell

Ditto- I’d talk to the host on this one- let them know the error you’re getting. Tweaking a server setting may get you squared away. Let us know how that one goes.

       
mmcclung's avatar
mmcclung
172 posts
17 years ago
mmcclung's avatar mmcclung

Yep, support ticket submitted.

Unfortunately, the client didn’t choose enginehosting, so I’m still waiting.

Tick. tock.

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
17 years ago
Robin Sowell's avatar Robin Sowell

Who is the host- and can you check if safe_mode is on? Might be possible to override via htaccess or something- if waiting is a pain. Which it always is 😉

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.