• I’m getting similar errors with both Entries RSS and Comments RSS in my blog at https://www.markblackshear.com/wordpress

    ENTRIES
    This page contains the following errors:
    error on line 2 at column 31: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.

    COMMENTS
    This page contains the following errors:
    error on line 2 at column 31: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.

    Does anyone know what’s going on and how to fix it? This has persisted through two or three upgrades. I also tested the blog with the default theme, and I’m seeing the problem there as well.

Viewing 1 replies (of 1 total)
  • Hi

    When I do “View Source” on your site, this is what I see at the top:

    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" dir="ltr" lang="en">
    <head profile="https://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    The meta statement that precedes the DOCTYPE statement is a duplicate of the meta statement that follows DOCTYPE. It’s illegal to have anything before DOCTYPE. That is what’s causing your RSS problem, because the same thing is happening on the RSS output and its causing invalid RSS code.

    Edit your theme’s header.php file. If you see a meta line before DOCTYPE, delete it. If you don’t, something is putting it there while the page assembles. The source of that something must be hunted down, because its the same something that’s creating the RSS problem.

    That you are seeing this with the default theme too means its not your theme creating the problem. Temporarily disable all plugins and see if the problem is resolved. If it is, turn the plugins back on one by one, until you find the one that is causing the problem.

Viewing 1 replies (of 1 total)
  • The topic ‘RSS Problem Persists’ is closed to new replies.