Title: sitemaps.xml error
Last modified: April 24, 2017

---

# sitemaps.xml error

 *  Resolved [otto.radics](https://wordpress.org/support/users/ottoradics/)
 * (@ottoradics)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/sitemaps-xml-error/)
 * Got an error page after clicking ‘View your sitemap’ button:
 * >  This page contains the following errors:
   > error on line 1 at column 2: StartTag: invalid element name
   >  Below is a rendering
   > of the page up to the first error.
 * site is: [https://www.csercsics.hu/sitemaps.xml](https://www.csercsics.hu/sitemaps.xml)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Benjamin Denis](https://wordpress.org/support/users/rainbowgeek/)
 * (@rainbowgeek)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/sitemaps-xml-error/#post-9062354)
 * Hi,
    try refreshing your permalinks first. If it still does not work, tell me
   what theme and plugins do you use.
 * Thanks
 *  Thread Starter [otto.radics](https://wordpress.org/support/users/ottoradics/)
 * (@ottoradics)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/sitemaps-xml-error/#post-9065172)
 * Hi,
 * I deleted the content of the rewrite_rules row in wp_options, flushed permalink
   in the plugin, but none of them helped.
 * I use Sage 8.4.2 and the following plug-ins:
 * Advanced Custom Fields
    Advanced Custom Fields Multilingual Advanced Custom Fields
   PRO Ajax Search for WooCommerce Akismet Anti-Spam Better Notifications for WordPress
   Email Address Encoder Enhanced Media Library Esemény szervező Events Manager 
   and WPML Compatibility FacetWP FacetWP – Map FacetWP – WPML FG Joomla to WordPress
   Premium FG Joomla to WordPress Premium Virtuemart module FG Joomla to WordPress
   Premium WPML module Image Watermark Invisible reCaptcha JCH Optimize Newsletter
   Ninja Forms OptiMonk Payment Cash Pickup PayPal for WooCommerce Postman SMTP 
   Quick Page/Post Redirect Plugin Really Simple CSV Importer Regenerate Thumbnails
   SEOPress Smartsupp Live Chat User Role Editor WooCommerce WooCommerce Brands 
   Woocommerce CSV Import WooCommerce Extra Charges To Payment Gateway (Standard)
   WooCommerce Measurement Price Calculator WooCommerce Multilingual Woocommerce
   Onsale Page WooCommerce PDF Invoices & Packing Slips WooCommerce Weight Based
   Shipping WP Super Cache WP Sync DB WP-Sweep WPML Media WPML Multilingual CMS 
   WPML Sticky Links WPML String Translation WPML Translation Management
 *  Plugin Author [Benjamin Denis](https://wordpress.org/support/users/rainbowgeek/)
 * (@rainbowgeek)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/sitemaps-xml-error/#post-9068631)
 * Try disabling all plugins and see if it works.
    If not, try using the default
   theme (like 2017). Thank you
 *  Thread Starter [otto.radics](https://wordpress.org/support/users/ottoradics/)
 * (@ottoradics)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/sitemaps-xml-error/#post-9077083)
 * I disabled a lot of plugins, but some of them required by the page to work:
    - Advanced Custom Fields
    - Advanced Custom Fields PRO
    - Ajax Search for WooCommerce
    - SEOPress
    - WooCommerce
    - WooCommerce Brands
    - Woocommerce CSV Import
    - WooCommerce Extra Charges To Payment Gateway (Standard)
    - WooCommerce Measurement Price Calculator
    - WooCommerce Multilingual
    - Woocommerce Onsale Page
    - WooCommerce PDF Invoices & Packing Slips
    - WooCommerce Weight Based Shipping
    - WPML Media
    - WPML Multilingual CMS
    - WPML Sticky Links
    - WPML String Translation
    - WPML Translation Management
 * After this, I got the following error message:
 * Warning: Cannot modify header information – headers already sent by (output started
   at /var/www/html/wp-content/themes/csercsics/base.php:11) in /var/www/html/wp-
   content/plugins/wp-seopress/inc/functions/sitemap/template-xml-sitemaps.php on
   line 5
 * Warning: Cannot modify header information – headers already sent by (output started
   at /var/www/html/wp-content/themes/csercsics/base.php:11) in /var/www/html/wp-
   content/plugins/wp-seopress/inc/functions/sitemap/template-xml-sitemaps.php on
   line 8
 * base.php: [https://pastebin.com/9px1Tg53](https://pastebin.com/9px1Tg53)
 * Moreover the XML sitemap is styled just like my regular theme.
 * Commenting out
 *     ```
       //XML
       Header('Content-type: text/xml');
   
       //Robots
       Header("X-Robots-Tag: noindex", true);
       ```
   
 * Solves the `Warning: Cannot modify header information - headers already sent 
   by (output started at /var/www/html/wp-content/themes/csercsics/base.php:11) 
   in /var/www/html/wp-content/plugins/wp-seopress/inc/functions/sitemap/template-
   xml-sitemaps.php on line 5` error message, but the page is still HTML.
 * After enabling the plugins one-by-one, I found the conflict with JCH Optimize(
   [https://hu.wordpress.org/plugins/jch-optimize/](https://hu.wordpress.org/plugins/jch-optimize/))
 *  Plugin Author [Benjamin Denis](https://wordpress.org/support/users/rainbowgeek/)
 * (@rainbowgeek)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/sitemaps-xml-error/#post-9083105)
 * Try to exclude the URL of your XML sitemaps in JCH Optimize.
    By the way, normally,
   caching plugins automatically exclude such files.
 *  Thread Starter [otto.radics](https://wordpress.org/support/users/ottoradics/)
 * (@ottoradics)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/sitemaps-xml-error/#post-9084127)
 * **tl;dr**
    Try disable geolocalize users with cache support: [https://wordpress.stackexchange.com/questions/204937/why-v-hash-is-added-to-my-urls](https://wordpress.stackexchange.com/questions/204937/why-v-hash-is-added-to-my-urls)
 * or use another plugin if the plugin still serves styled, HTML content instead
   of XML.
 * = = = = = = = =
 * It was quite a complex issue and it is partially solved. There was a redirect
   which added a special hash for the visitor’s IP to solve the problem with static
   page caching + WooCommerce: [https://wordpress.stackexchange.com/questions/204937/why-v-hash-is-added-to-my-urls](https://wordpress.stackexchange.com/questions/204937/why-v-hash-is-added-to-my-urls)
 * After disabling “geolocalize users with cache support” in Woocommerce, things
   got back to sort-of-normal: the plugin still serves styled, HTML content instead
   of XML. Since then I installed another plugin for this functionality, so this
   thread is sort-of-solved.
 *  Plugin Author [Benjamin Denis](https://wordpress.org/support/users/rainbowgeek/)
 * (@rainbowgeek)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/sitemaps-xml-error/#post-9084654)
 * OK!
    Thank you for this feedback.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘sitemaps.xml error’ is closed to new replies.

 * ![](https://ps.w.org/wp-seopress/assets/icon-128x128.gif?rev=3158903)
 * [SEOPress - AI SEO Plugin & On-site SEO](https://wordpress.org/plugins/wp-seopress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-seopress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-seopress/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-seopress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-seopress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-seopress/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Benjamin Denis](https://wordpress.org/support/users/rainbowgeek/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/sitemaps-xml-error/#post-9084654)
 * Status: resolved