• Hi,
    This is my first time posting in the wordpress forum.
    I’m running into a really weird error that has me at a loss. I’m working on a site and I’m trying to read from an RSS feed but I keep getting

    Error RSS: This XML document is invalid, likely due to invalid characters. XML error: Mismatched tag at line 12, column 8

    The problem is that I have checked the RSS feed on https://validator.w3.org/feed/ and it is a valid feed. The same thing has happened with other feed sources, and oddly the error is always at line 12, column 8. Not only that, if I keep hitting the refresh button on the browser the line 12 changes to line 109 sometimes and then back again to 12. But there’s more, one of the feeds that I’m testing doesn’t even have more than 100 lines and it stills shows the error on line 109 sometimes. Also this same feed on line 12 (remember that the error switches back to line 12 on refresh) only has this: <item>, which means there’s no column 8. I’ve tested this on 3 separate installations of WordPress, using different themes (even the included twenty seventeen) and different plugins and versions of WordPress, 4.7 and 4.7.4. I can’t provide a url for the site because it’s running on an intranet, but here’s a sample of the rss code that is not working, although is valid

    <?xml version='1.0' encoding='UTF-8' ?>
    <rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>
        <channel>
            <title>Online Resource Portal</title>
            <link>http://www.myurl.local/index.php?P=Home</link>
            <description>Channel Description</description>
            <atom:link href='http://www.sitio.local/index.php?P=RSS' rel='self' type='application/rss+xml' />
            <language>es-es</language>
            <pubDate>Thu, 19 Oct 2017 12:00:00 -0400</pubDate>
            <lastBuildDate>Mon, 10 Apr 2017 12:00:00 -0400</lastBuildDate>
            <docs>http://www.rssboard.org/rss-2-0-1</docs>
            <item>
                <title>Laboratorio Clínico</title>
                <link>http://www.sitio.local/index.php?P=FullRecord&ResourceId=6</link>
                <guid>http://www.sitio.local/index.php?P=FullRecord&ResourceId=6</guid>
                <description>Laboratorio Clínico</description>
                <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
            </item>
            <item>
                <title>Familia y Juventud</title>
                <link>http://www.sitio.local/index.php?P=FullRecord&ResourceId=5</link>
                <guid>http://www.sitio.local/index.php?P=FullRecord&ResourceId=5</guid>
                <description>Familia y Juventud</description>
                <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
            </item>
            <item>
                <title>Diabetes Mellitus en el Embarazo</title>
                <link>http://www.sitio.local/index.php?P=FullRecord&ResourceId=4</link>
                <guid>http://www.sitio.local/index.php?P=FullRecord&ResourceId=4</guid>
                <description>Diabetes Mellitus en el Embarazo</description>
                <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
            </item>
            <item>
                <title>Baja Visión</title>
                <link>http://www.sitio.local/index.php?P=FullRecord&ResourceId=3</link>
                <guid>http://www.sitio.local/index.php?P=FullRecord&ResourceId=3</guid>
                <description>Baja Visión</description>
                <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
            </item>
            <item>
                <title>Glaucoma</title>
                <link>http://www.sitio.local/index.php?P=FullRecord&ResourceId=2</link>
                <guid>http://www.sitio.local/index.php?P=FullRecord&ResourceId=2</guid>
                <description>Glaucoma</description>
                <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
            </item>
            <item>
                <title>Adulto Mayor</title>
                <link>http://www.sitio.local/index.php?P=FullRecord&ResourceId=1</link>
                <guid>http://www.sitio.local/index.php?P=FullRecord&ResourceId=1</guid>
                <description>Adulto Mayor</description>
                <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
            </item>
        </channel>
    </rss>
    • This topic was modified 8 years, 7 months ago by hrivera.
Viewing 2 replies - 1 through 2 (of 2 total)
  • This is usually caused by either special characters in the RSS feed ( like & , ” that break the XML format ) or special chars in the alphabet. You can check if the Spanish letters there are consistent with the position of the error.

    Thread Starter hrivera

    (@hrivera)

    Sorry for the late reply, I hadn’t received any notifications. And if have no control over the creation of the feed, what could I do?. As you have probably noticed the feed is in spanish and the site as well. I thought the character encoding was taken into account when fetching. Also, on the site I’m using othe feed sources also in spanish and they’re working fine. Could this be an issue with SimplePie? Because remember that although in spanish the feed is still valid. Thanks

    • This reply was modified 8 years, 7 months ago by hrivera.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Weird error on RSS Feed’ is closed to new replies.