• Resolved FreshIdeaWebsites

    (@freshideawebsites)


    Searched this forum and many people have complained about the same issue…
    – all other XML files are fine and work correctly (author-sitemap.xml etc etc)
    – only page-sitemap.xml is not working
    In my case (as with a few others) there is HTML code at the top of the source code prior to the <?xml> tag which of course causes the page NOT to be rendered as XML. Specifically…
    <input type=”hidden” id=”_wpnonce” name=”_wpnonce” value=”b0717a8623″ /><input type=”hidden” name=”_wp_http_referer” value=”/page-sitemap.xml” /><input type=”hidden” name=”_wp_http_referer” value=”/page-sitemap.xml” /><?xml version=”1.0″ encoding=”UTF-8″?>
    Some other solutions suggest a plugin conflict however the injected code in this case are form values that specifically reference page-sitemap.xml. This suggests that the code comes from the Yoast SEO plugin.
    Since this issue with page-sitemap.xml seems to be fairly common, any chance of a updated fix for the plugin?
    Otherwise any other suggestions to avoid the injected html in the header of this xml?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Sa?a

    (@stodorovic)

    I see that you have installed Divi theme which executes all shortcodes in pages (posts) while Yoast SEO parses images in sitemap. I’d guess that’s an issue related to direct output related to some shortcode (which doesn’t follow WP codex).

    I’ve located similar HTML code in pages: mailing-list and sing-loo-faq. You could try to temporary remove these pages from sitemap (set noindex to these pages) or maybe you could try to comment filter wpseo_sitemap_content_before_parse_html_images in PHP code ( divi-builder/includes/builder/plugin-compat/wordpress-seo.php ). On this way, you will confirm my suspections.

    How you have created these forms (I’d guess to you have used plugin Constant Contact for WordPress)? I’ll try to reproduce it if you send more details.

    Thread Starter FreshIdeaWebsites

    (@freshideawebsites)

    Thx for the reply. I set the two pages you quoted as noindex and the page-sitemap.xml now works and displays correctly. Yes, the mailing-list page used a Contact Form plugin and that is probably the most likely culprit. However I’m ok with simply not indexing those two pages so I’ll leave it at that for now.

    Sa?a

    (@stodorovic)

    Thank you for the feedback. I’ve created the issue on github.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Page-sitemap.xml error’ is closed to new replies.