Viewing 7 replies - 1 through 7 (of 7 total)
  • Ran into the same issue. It seems to be happening because the title separator is outputted as an entity name (eg –) instead of entity number (&#8211) – at least in Custom Post Type feeds.

    A similar issue was reported and fixed about two years ago.

    Tested with the latest Yoast version, 19.14 and 19.13.

    I dug a little deeper to find out the possible cause for this.

    It looks like the use of pre_get_document_title filter short-circuits the wp_get_document_title , which has filter document_title_separator.

    That document_title_separator filter is used on feed-imporvements.php file to decode entities. But since the whole title generation is short-circuited, said filter is never used.

    The following code, added to the theme, fixed it for now.

    add_action( 'get_wp_title_rss', function( $title ) {
       return html_entity_decode( $title );
    } );

    I believe Yoast should do something similar in feed-imporvements.php instead of using document_title_separator filter.

    Plugin Support Maybellyne

    (@maybellyne)

    Hello @antcrescendo

    I’m sorry abpout the declaration error in your sitemap. This happens when an empty whitespace or a blank line appears due to a conflict with another plugin or your theme. Usually, there is an empty space or a blank line before or after the closing PHP opening or closing tag, which shouldn’t be there.

    You can narrow down the exact source of conflict by performing a conflict check. Once you have identified whether your theme or a plugin causes the issue, please contact the developers of that theme or plugin for assistance in finding and removing the white space.

    This thread was marked resolved due to a lack of activity, but you’re always welcome to re-open the topic. Please read this post before opening a new request.

    Thread Starter antcrescendo

    (@antcrescendo)

    Hello @maybellyne, I created a troubleshooting test environment with the “healthcheck and troubleshooting” plugin and Yoast is the only plugin I have enabled, but it still gives me the same error when I preview my XML sitemap.

    Although I disabled all of the plugins to rule out any potential conflicts, it appears that I am still encountering the same XML sitemap error.

    List of plugins: https://postimg.cc/MMPzznbt

    You will see in the screenshot above that all my plugins are disabled besides Yoast and the Health Check plugin.

    I am also using the Twenty Twenty-Two theme version 1.3

    Yoast Version 19.14

    luxuryes

    (@luxuryes)

    I do have the same problem with – I run wordpress version 6.2.2 , yoast version 20.8

    For the moment I fixed the trouble with the solutions provided by @sippis

    Thank you Timi Wahalahti !

    Zoli Konta

    (@zolikonta)

    Had the same problem with – title separator. Either choose normal dash or use the temporary workaround provided by @sippis

    Both solutions worked for me.
    Thanks!

    • This reply was modified 9 months ago by Zoli Konta.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘XML sitemap preview error in browser’ is closed to new replies.