WordPress.org

Ready to get started?Download WordPress

Forums

Can someone tell my why this rss2 doesn't validate (9 posts)

  1. dotnature
    Member
    Posted 8 years ago #

    My rss2 does not validate at all I dont understand why it returns the error "line 6, column 2: XML parsing error: <unknown>:6:2: not well-formed (invalid token)"

    for <title>

    Heres my rrs2.php I dont see anything worng in it?

    [moderated - removed long code.
    Don't post long code here, please!
    It is difficult to read and nobody really bothers to take a look at it. You can use http://pastebin.com or similar services - and post back with the URI.
    For posting small code snippets, please read carefully the instructions here below the text input area: the "backticks" usually are located on top-left of your keyboard, where ~ [tilde] is.
    Thank you for your understanding!]

  2. moshu
    Member
    Posted 8 years ago #

    You have very strange URL, e.g. for a single post:
    http://dotnature.com/index.php?option=com_jd-wp&Itemid=46&p=14

  3. niziol
    Member
    Posted 8 years ago #

    It looks like your site is generated by Joomla/Mambo, I'm guessing that's the odd permalink structure, but perhaps that's the problem with the RSS as well?

  4. dotnature
    Member
    Posted 8 years ago #

    Actually I think I found out why, it is

    <guid isPermaLink="false">
    <?php the_guid(); ?></guid>

    Not sure how or what yet though will fix it besides taking it right out.

  5. Yngwin
    Member
    Posted 8 years ago #

    If you're using & in your guid link, that should be encoded as &amp; - one of the basic rules of XML.

  6. frankpereiro
    Member
    Posted 7 years ago #

    I have been looking for an answer to this and I'm sure my problem with my rss2 feed is the one mentioned by Yngwin.

    I have a question, how do you encode automatically "&" as "&"?

    You see, the problem I have is that the posts in my blog come from different sources, and I like to point the visitors to the original post in the original blog that wrote such article or post.

    Many of those sites have "&" in their link structure and that's why I have the errors when validating.

    I don't know if I was clear enough, english is not my mother language.

    Thanks in advanced,

  7. frankpereiro
    Member
    Posted 7 years ago #

    The second paragraph should be:

    I have a question, how do you encode automatically "&" as "& a m p ;"?

    Sorry about this.....

  8. nFriedly
    Member
    Posted 7 years ago #

    This is probably a bit late to be useful to you, but i also had the same problem and here's how I fixed it:

    I modified the function the_guid() in line 53 of
    wp-includes/template-functions-post.php

    it started as :
    function the_guid( $id = 0 ) {
    echo get_the_guid($id);
    }

    and I changed it to:
    function the_guid( $id = 0 ) {
    $guid = get_the_guid($id);
    $guid = eregi_replace('(&)(.{3,6}[^;])','&amp;\2',$guid);
    echo $guid;
    }

    then everything was suddenly valid.

  9. nFriedly
    Member
    Posted 7 years ago #

    well, it was indented, but thats html for you...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.