Support » Fixing WordPress » RSS enclosures not working for mp3 files on alpha5

  • Hello, I just upgraded to 1.3alpha5 from alpha3 (using PHP5), and posted a post with an URL pointing to an mp3 file in it; theoretically, it should have recognized it and have added it as an <enclosure …> tag into the rss2 feed – à la podcast – but apparently it didn’t.
    I also tried trackbacking it, adding it as a link (blah), and it still didn’t work. Also, AFAIK, my WordPress automagically sends pingbacks to any URL I add to my posts, so in case enclosing depends on it, it should work.
    The only way i had to make it add an enclosure tag was to manually add an “enclosure” custom field with the url as the value, but obviously it didn’t add the length of the file referenced, nor the mime-type.
    Also, since the enclosure tags are added to the RSS feed by looking at the wp_postmeta table, i kept having a look at it and never got ever added to it (except when i added the custom field myself).
    Curiously enough, URLs pointing to jpg images work like a charm.
    I saw people happily using podcasts with the alpha4… I peeked into the WebCVS diffs but nothing radical seemed to change inside do_enclosure() lately, so I’m really not sure of the problem.
    I tried adding some print statements at crucial points of do_enclosure(), but I got a fatal PHP formatting error (I’m afraid I can’t remember exactly what it was) so I couldn’t check.
    I even tried connecting manually and doing what WP would do (HEAD /path/filename HTTP/1.1\nHost: hostname) but it seems perfect, and I do receive the length and mime-type. The mime-type, incidentally, is audio/mpeg; since the enclosure is considered only for audio/*, video/* and image/* mime-types, that should be fine.
    I even tried incrementing the socket fgets() to 8192, but to no avail.
    Any hints would be greatly appreciated, and I’ll gladly provide any other information if needed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I second this message and I am also searching a way to add mime type and length to enclosures

    Moderator James Huff


    Volunteer Moderator

    You could sign up to have your feed run through FeedBurner. Just signup and activate SmartCast, and they’ll do the enclosures for you.


    Thanks but I don’t want to use a third part provider for such a simple thing

    Looking closely at wp-rss2.php it appears that the solution is damn simple and wordpress can perfectly do podcast without any external help

    Simply vrite in the enclosure texarea the 3 value one by line
    for example :
    http ://

    In the rss feed this will translate in :
    <enclosure url=�� length=�7854155475� type=�audio/mpeg�/>

    Hope this helps

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘RSS enclosures not working for mp3 files on alpha5’ is closed to new replies.