WordPress.org

Ready to get started?Download WordPress

Forums

Enclosures Not Being Created (12 posts)

  1. PatrickMelton
    Member
    Posted 9 years ago #

    I am using 1.5.1.2 for my podcast at http://www.nobodylikesonions.com and am having a problem with WordPress - it isn't automatically generating the enclosure tag in my RSS (or the field in the entry).

    I was hosting my MP3 files locally and it was working fine, but have since moved them to an off-site server (www.lbsyn.com). While there were hosted locally, the enclosures were generated automatically with no problem.

    Now, I link to an MP3 file (using it's fully qualified URI beginning with http://) and it doesn't generate the enclosure.

    What am I doing wrong?

  2. dgstinner
    Member
    Posted 9 years ago #

    When I look at http://www.nobodylikesonions.com/nlo/wp-rss2.php I do see the enclosures.

  3. PatrickMelton
    Member
    Posted 9 years ago #

    Thanks.

    I put those there manually. I never said "I don't know how to get enclosures in my feed" or "My feed doesn't have enclosures".

    It's not doing it automatically, as I understand it should.

  4. dgstinner
    Member
    Posted 9 years ago #

    You didn't say you put them in manually. It was implied that when you said the enclosures weren't being put in automatically, they shouldn't be there at all if someone were to look at the RSS feed.

  5. PatrickMelton
    Member
    Posted 9 years ago #

    I didn't need to say I put them in there manually. I was looking for a solution to the problem, not an opinion on my workaround.

    So, does anyone know anything about this?

  6. leviw
    Member
    Posted 9 years ago #

    I'm having the same problem, Patrick.

    Tone it down a little though, my first thought about two comments into this thread was, "Woah, hostile."

    If I find out anything about this problem I'll return and post.

  7. leviw
    Member
    Posted 9 years ago #

    I realized part of my problem was using unsupported characters in my filenames, such as spaces or [ marks.

    However, the exact same filename worked locally and did NOT work remotely, so my problem is only halfway solved.

  8. phylaxis
    Member
    Posted 9 years ago #

    Mine does not work either. I think it may be due to the fact that the Libsyn link does not link directly to the MP3 file, it does a redirect. Has anyone discovered a workaround for this yet?

  9. PatrickMelton
    Member
    Posted 9 years ago #

    Damn libsyn...

  10. RobotDan
    Member
    Posted 9 years ago #

    I can confirm that WordPress can't work out the mp3 enclosure for files hosted on Libsyn. My workaround has been to.... you guessed it... copy and paste them in by hand.

  11. KCT
    Member
    Posted 9 years ago #

    Is there no way to effectively use WordPress for files hosted on Libsyn?

  12. DavidMeade
    Member
    Posted 8 years ago #

    I was having a problem like this where my files were hosted on a server that gave me a permalink which in turn issued a 302 redirect to the actual media file.

    I just wrote up a little modifcation of the code to allow word press to check the file behind a redirect. I tested it and it works with Libsyn ...

    To allow this, you need to make 2 small changes to the wp-includes/functions.php file.

    FIND:
    for ( $i = 0; $i < $count; $i++) {
    $key = strtolower($matches[1][$i]);
    $headers["$key"] = $matches[2][$i];
    }

    (the above should be around line line 818)

    AFTER ADD:
    $headers['status_code'] = substr($response,0,strpos( $response, "\r\n", 0));

    FIND:
    if ( $headers = wp_get_http_headers( $url) ) {
    (the above should be around line 783)

    AFTER ADD:
    if ($headers['status_code'] == 'HTTP/1.1 302 Found' )
    {
    $headers = wp_get_http_headers($headers['location']);
    }

Topic Closed

This topic has been closed to new replies.

About this Topic