Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Benjamin Denis

    (@rainbowgeek)

    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

    (@ottoradics)

    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

    (@rainbowgeek)

    Try disabling all plugins and see if it works.
    If not, try using the default theme (like 2017).
    Thank you

    Thread Starter otto.radics

    (@ottoradics)

    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

    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.www.ads-software.com/plugins/jch-optimize/)

    Plugin Author Benjamin Denis

    (@rainbowgeek)

    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

    (@ottoradics)

    tl;dr
    Try disable geolocalize users with cache support: 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

    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

    (@rainbowgeek)

    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.