(+84) 463.28.7979

Is the RSS Feed of your WordPress Blog Working in all Major browsers?

This morning one of my site visitors was kind enough to email me saying that the RSS Feed of my blog wasn’t working on Internet Explorer and Google Chrome browsers. Internet Explorer is well known for its issues so I wasn’t that alarmed but my hearth jumped as soon as I double checked the RSS feed on Chrome and found that it was complaining too.

In this article I am going to explain what the error was and what I did to resolve it so you don’t panic if it ever happens to you.

The 1st RSS feed Error and Solution

Internet explorer was displaying the following error when I clicked the RSS feed link on my site:

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

Chrome gave me the following which was a bit better as it was pointing out the line of the error rather than saying there is an error:

This page contains the following errors:

error on line 485 at column 330: Encoding error

At this stage my best option was to validate my RSS feed using the W3C Feed Validator

A quick validation check revealed that I had some special characters in one of my posts. I wrote an article earlier explaining how some of my posts started showing special characters after I transferred my blog to the new hosting and how I got rid of those character encoding issues but looks like I didn’t get rid of all of them. I manually edited the post and got rid of the special character which fixed this issue.

The 2nd RSS feed Issue and the Solution

After fixing the special character issue I checked my RSS feed again but this time it showed a different RSS feed validation error:

“Extra content at the end of the document”

The 1st error was easy to spot and I fixed it quickly but this 2nd error took me a while to figure out. I first opened the HTML source of my home page and I noticed that there was a block of junk after the </html> tag:

<!– [706cd2035ae36e7da672679079dd81b9 --><!-- 0668184521 --><div style="overflow:auto; visibility:hidden; height: 1px; "><ul><li><a href="http://rtbi30h3h34h34.cc/1">.</a></li></ul></div><!-- 706cd2035ae36e7da672679079dd81b9] –>

This looks very suspicious but couldn’t figure out how it was getting appended there. Googling these random strings revealed nothing. So I started disabling the plugins to see if any of the plugins were adding this weird block of code. When this didn’t help I got a little frustrated and decided to do a UNIX Grep to see where that string of text was coming from. Surprisingly, it revealed that it was coming from the “index.php” file in the root of my domain which had the following in it’s header:

<?php @register_shutdown_function(“__sfd1254818660__”);function __sfd1254818660__() { global $__sdv1254818660__; if (!empty($__sdv1254818660__)) return; $__sdv1254818660__=1; echo <<<DOC__DOC

<!– [706cd2035ae36e7da672679079dd81b9 --><!-- 0668184521 --><div style="overflow:auto; visibility:hidden; height: 1px; "><ul><li><a href="http://rtbi30h3h34h34.cc/1">.</a></li></ul></div><!-- 706cd2035ae36e7da672679079dd81b9] –>

} ?>

Obviously something altered the “index.php” file (most likely a dodgy plugin). I replaced it with a fresh “index.php” file from the WordPress package and it fixed the error. So two things to keep in mind:

  1. Check to make sure your RSS feed is working fine or you will loose subscribers because most of the visitors won’t bother to tell you about it.
  2. Be careful when you install new plugins.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>