• Hi,

    i have been using all in one seo for w while now but i have now discovered that the sitemap is in an unsupported format for google ;

    Your Sitemap does not appear to be in a supported format. Please ensure it meets our Sitemap guidelines and resubmit.

    and when i tried to view it i got this message ;

    XML Parsing Error: junk after document element
    Location: https://jamesdicksonbooks.com/sitemap.xml
    Line Number 2, Column 1:<b>Fatal error</b>: Unknown: Cannot use output buffering in output buffering display handlers in <b>Unknown</b> on line <b>0</b>
    ^

    Can you help ?

    Thanks, James.

    https://www.ads-software.com/plugins/all-in-one-seo-pack/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Steve M

    (@wpsmort)

    Hi James,

    The problem is caused by a blank in one of the PHP files of your theme. You need to check all the files of your theme to look for a blank line before the opening PHP tag or after the closing PHP tag. Once you delete that the sitemap should work fine and Google should accept it.

    Thread Starter jamessh1990

    (@jamessh1990)

    Thanks very much for your quick response. I don’t suppose you would know a quick way to find out which file the problem is in ?

    Thanks, James.

    Thread Starter jamessh1990

    (@jamessh1990)

    I have just enabled sitemap indexing and it looks like it may have sorted it. Can you have a look and let me know if it has. Sorry to be a pain, i am new to this.

    https://jamesdicksonbooks.com/sitemap.xml

    Thanks again for your help.

    Plugin Support Steve M

    (@wpsmort)

    Hi James,

    I wouldn’t enable sitemap indexes if I were you. Google seems to have a problem with them and I’ve seen a lot of people report issues with Google when doing this. Sitemap indexes should only be used when you have over 50,000 URLs on your XML Sitemap.

    I don’t know a quick and easy way to find blank lines in a PHP file. Its a known issue with XML that if you have a blank line outside PHP tags then XML will break. If you search Google you’ll see many results for this and many people asking if there’s an easy way to find blank lines. Some people have posted solutions that use egrep and other advanced Linux commands but you’d have to be very good with Linux to do this. My advise, start with the functions.php file, then the header.php file, then the footer.php file.

    I do see that you are caching your XML Sitemap using WP Super Cache. This is an extremely bad idea because then Google could get a cached sitemap and not the latest sitemap. You need to consult the documentation or support for WP Super Cache on how to exclude the XML Sitemap from caching.

    Thread Starter jamessh1990

    (@jamessh1990)

    Hi,

    i think it has sorted it self out now. I disabled sitemap indexing and it seems to be accessible now. Can you check it when you get a minute just to be safe. https://jamesdicksonbooks.com/sitemap.xml

    Thanks for your help, James.

    Plugin Support Steve M

    (@wpsmort)

    Hi James,

    I’m still seeing the original problem which is caused by a blank line in a PHP file –

    error on line 2 at column 1: Extra content at the end of the document

    The best way to resolve this is to find that blank line. Check the main theme files – functions.php, header.php, footer.php, index.php, page.php and single.php first.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sitemap’ is closed to new replies.