• Resolved philrp

    (@philrp)


    Hello,

    I switched to SEOPress today and I am having critical errors trying to get XML sitemaps to display.

    Site is Astra theme, Elementor builder, and WP Super Cache (I prevented caching of xml per the seopress support document)

    Using debug mode, at first I was getting:

    XML Parsing Error: junk after document element
    Location: https://www.mywebsite.ca/sitemaps.xml
    Line Number 2, Column 1:
    <b>Deprecated</b>:? str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in <b>/home/mysitedirectory/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase2.php</b> on line <b>54</b><br />^

    Using a patched version of the wp-cache-phase1.php file from the wp-super-cache GitHub I solved this issue, but now I get the following error when trying to open the posts-sitemap1.xml and pages-sitemap1.xml (the categories and tags xml links open fine)

    Fatal error: Uncaught Exception: Failed to parse time string (<span class=”modified-category”></span>) at position 0 (<): Unexpected character in /home/mysitedirectory/public_html/wp-content/plugins/wp-seopress/templates/sitemap/single.php:168 Stack trace: #0 /home/mysitedirectory/public_html/wp-content/plugins/wp-seopress/templates/sitemap/single.php(168): DateTime->__construct() #1 /home/mysitedirectory/public_html/wp-content/plugins/wp-seopress/src/Services/Sitemap/Render/Single.php(111): include_once(‘/home/mysitedirectory/…’) #2 /home/mysitedirectory/public_html/wp-content/plugins/wp-seopress/src/Actions/Sitemap/Render.php(81): SEOPress\Services\Sitemap\Render\Single->render() #3 /home/mysitedirectory/public_html/wp-includes/class-wp-hook.php(310): SEOPress\Actions\Sitemap\Render->render() #4 /home/mysitedirectory/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() #5 /home/mysitedirectory/public_html/wp-includes/plugin.php(565): WP_Hook->do_action() #6 /home/mysitedirectory/public_html/wp-includes/class-wp-query.php(1881): do_action_ref_array() #7 /home/mysitedirectory/public_html/wp-includes/class-wp-query.php(3800): WP_Query->get_posts() #8 /home/mysitedirectory/public_html/wp-includes/class-wp.php(662): WP_Query->query() #9 /home/mysitedirectory/public_html/wp-includes/class-wp.php(782): WP->query_posts() #10 /home/mysitedirectory/public_html/wp-includes/functions.php(1335): WP->main() #11 /home/mysitedirectory/public_html/wp-blog-header.php(16): wp() #12 /home/mysitedirectory/public_html/index.php(17): require(‘/home/mysitedirectory/…’) #13 {main} thrown in /home/mysitedirectory/public_html/wp-content/plugins/wp-seopress/templates/sitemap/single.php on line 168

    Since this mentions categories, I’m also having an issue where the archive and post pages are showing the category link in the upper left corner of the page on the frontend, just at the top of the <body> section, so it shows above the header. This links appears and disappears with activating and deactivating the seopress plugin.

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

    (@rainbowgeek)

    Hi,

    can you share the URL of your site please?

    Which version of WordPress, SEOPress Free and PHP do you use?

    If you deactivate WP Super Cache, is it better?

    We have not been able to reproduce the bug on our local setup.

    Try also to add this hook to disable shortcodes execution in xml sitemaps:

    https://www.seopress.org/support/hooks/enable-disable-execution-of-shortcodes-in-xml-image-sitemaps/

    About your second issue, please share a link or screenshot of the issue.

    Thanks

    Thread Starter philrp

    (@philrp)

    Hello,

    Thank you for the response.

    The site is on all current versions of all software, including WordPress 6.3.1 and SEOPress 7.0.1

    This is an url to the site: https://www.fashionbeautyrunway.ca/section/articles/

    As you can see, SEOPress is causing the category to display in the top left corner of archive and post pages.

    As for the sitemap critical errors on post-sitemap1.xml and page-sitemap1.xml

    • I’ve tried disabling: Wp Super Cache, Autoptimize and Wordfence
    • I’ve tried PHP 7.4, 8.0 and 8.1 (normally on 8.1)
    • I tried disabling shortcodes execution in xml sitemaps as you suggested and it did not help

    Thank you for the help.

    I moved to SEOPress with the intention of getting PRO, would opening a support ticket be better?

    Plugin Author Benjamin Denis

    (@rainbowgeek)

    “As you can see, SEOPress is causing the category to display in the top left corner of archive and post pages.” -> go SEO, Advanced and use the blue toggle to disable temporary this feature.

    Save changes and clear your cache. Is this better?

    “I moved to SEOPress with the intention of getting PRO, would opening a support ticket be better?” absolutely, you will get support by email and be able to share private informations easily.

    Thread Starter philrp

    (@philrp)

    I bought the plugin and their support was very helpful.

    I will keep using SEOpress

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘XML sitemap – critical errors on site’ is closed to new replies.