• Resolved 3Lancer

    (@3lancer)


    After updating from 4.0.2 to 4.0.3 and recreating the sitemap, I got the following parsing error on all the generated XMLs.

    XML Parsing Error: XML or text declaration not at start of entity
    Location: (domain)/sitemap.xml
    Line Number 2, Column 1:<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="(domain)/wp-content/plugins/google-sitemap-generator/sitemap.xsl"?><!-- generator="wordpress/3.8.2" -->
    ^

    I’m curious if it’s due to being line 2, rather than line 1? But the code wasn’t modified and I reattempted a reinstall of the plugin with the same results. I also updated to using PHP 5.4.26 around the same time, if that matters. Any ideas?

    I attempted to resolve a backup copy of the version 4.0.2 for the plugin. This now has resulted in the error on those sitemaps:

    XML Parsing Error: No element found
    Location: (domain)/sitemap.xml
    Line Number 1, Column 1:
    ^

    Quickly followed by:

    Content Encoding Error
    
    The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

    I am using GZip Compression, but it was working fine before.

    I believe the update has messed with the ‘.htaccess’ file?

    https://www.ads-software.com/plugins/google-sitemap-generator/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter 3Lancer

    (@3lancer)

    Rolling back the PHP version didn’t help either.

    However, might be unrelated to this plugin…

    RESOLVED: I added a ‘wejnswpwhitespacefix.php’ to the WordPress ‘index.php’ to clean up that new line at the top of the sitemap.xml and feeds. Started working again, then the update also seems to of worked. Have yet to hunt down where that new line came from, causing the issue.

    Thread Starter 3Lancer

    (@3lancer)

    I believe this isn’t any issue of the plugin, unless it introduced that white space, however it was probably more likely something I did or it could be another plugin. In that case, you probably can ignore this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Update to version 4.0.3 – XML Error’ is closed to new replies.