Support » Plugin: SEOPress - On-site SEO » sitemaps.xml error
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.
-
Hi,
try refreshing your permalinks first.
If it still does not work, tell me what theme and plugins do you use.Thanks
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 ManagementTry disabling all plugins and see if it works.
If not, try using the default theme (like 2017).
Thank youI 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
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/)
Try to exclude the URL of your XML sitemaps in JCH Optimize.
By the way, normally, caching plugins automatically exclude such files.tl;dr
Try disable geolocalize users with cache support: https://wordpress.stackexchange.com/questions/204937/why-v-hash-is-added-to-my-urlsor 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
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.
OK!
Thank you for this feedback.
- The topic ‘sitemaps.xml error’ is closed to new replies.