Sitemap problem…XML Parsing Error: not well-formed

#1079
  • Resolved Mid Sussex Websites
    Rank Math free

    Hi All,

    Congratulations on what appears to be a truly great plugin, fingers crossed you can help with this issue 🙂

    When I click the link to my sitemap (this is on a development site) I get the following error displayed on the resulting opened page…

    XML Parsing Error: not well-formed
    Location: Moved to the sensitive data section
    Line Number 150, Column 86: [0] => SELECT * FROM msw18_wfblocks7 WHERE IP = ‘\0\0\0\0\0\0\0\0\0\0ï¿¿
    ————————————————————————————-^

    I have tried everything to fix this and failed. I have followed the checklist in your support article for sitemaps, I have tried every PHP version available to me (5 through to 7.3), I have installed the ‘Health Check’ plugin and activated nothing but Rank Math, all to no avail!

    So, to pre-empt the likely request I have dropped a link to a temporary login in the ‘Sensitive Data’ area above.

    I shall sit tight, drink some bourbon and await (hopefully good) news from you.

    Very many thanks for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    It seems like some caching issue as I can not see any conflict in there.

    It is working fine now.

    This is what I did, as it was a staging site:
    1. Activated the default WP theme.
    2. Deactivated all the plugins except the Rank Math.
    3. Started activating all the plugins back until they all were activated.

    The sitemaps were still working fine.

    So it is safe to assume that the caching was causing a problem.

    Can you please confirm on your end if the things are working fine now?

    Looking forward to helping you.

    ​​​​​​​

    Hi

    Many thanks for that. Actually, once I logged back in the problem was still evident.

    So, I followed the same steps as you and have identified ‘Query Monitor’ as the problem plugin…https://wordpress.org/plugins/query-monitor/

    Once that is deactivated all is OK, but when activated the problem occurs. I guess it is not needed on a live site, but it would require that the Query Monitor plugin be de-activated before making a site live to ensure the sitemap was working.

    Would be great to get a fix if at all possible, perhaps somebody could test on another installation with Query Monitor installed and activated to verify my findings.

    Many thanks again,
    Lee

      Update

    Whilst dealing with an unrelated issue I switched off WordPress WP-DEBUG by adding the following code to the wp-config.php file,

    ini_set(‘display_errors’,’Off’);
    ini_set(‘error_reporting’, E_ALL );
    define(‘WP_DEBUG’, false);
    define(‘WP_DEBUG_DISPLAY’, false); 

    Having made that change I am now able to activate ‘Query Monitor’ AND have the sitemap creation function correctly.

    I’m not smart enough to understand why that should be the case, but removing the error reporting does what I need 🙂

    Hello,

    Glad you got that sorted.

    Also, it seems like the issue was coming from the Wordfence Security plugin as indicated in the error message.

    Can you please check with the Wordfence’s team as well?

    Appreciate your understanding and the patience in this matter.

    Thank you.

    • This reply was modified 5 years, 9 months ago by Rank Math. Reason: Edited the post to reflect the actual cause of the error message
Viewing 4 replies - 1 through 4 (of 4 total)

The ticket ‘Sitemap problem…XML Parsing Error: not well-formed’ is closed to new replies.