Sitemap error: error on line 2 at column 84: Extra content at the end of the doc

#107855
  • Resolved abcde
    Rank Math pro

    The sitemap is not working on my newly installed WP site.

    First, the URL is in this odd format: domain/index.php/sitemap_index.xml (why is the index.php there?)

    And when I open the sitemap, it gives this error:

    This page contains the following errors:
    error on line 2 at column 84: Extra content at the end of the document
    Below is a rendering of the page up to the first error.

Viewing 15 replies - 1 through 15 (of 24 total)
  • Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    I have the same problem. How to fix it.

    Same problem, I can not connect to Google Analytic

    I have the same problem.
    “This page contains the following errors:
    error on line 2 at column 84: Extra content at the end of the document
    Below is a rendering of the page up to the first error.”
    How to fix it.?

    I have the same problem

    I figured out what seemed to be the problem.

    There were no pages published since it was still a fresh wp installation. After I published the first page the error was gone

    Dani Vera
    Rank Math business

    Same problem too….

    Adrian
    Rank Math free

    This page contains the following errors:
    error on line 2 at column 84: Extra content at the end of the document
    Below is a rendering of the page up to the first error.

    RS
    Rank Math free

    Same problem

    RS
    Rank Math free

    I’m getting a lot of these PHP warnings in the logs:

    PHP Warning file_get_contents(/nas/content/live/xxxxxxx1/wp-content/uploads/rank-math/rank_math_db75f2bac996b279b973d046aa2fe245.xml): failed to open stream: No such file or directory 
        [internal] file_get_contents
        /nas/content/live/xxxxxxx1/wp-admin/includes/class-wp-filesystem-direct.php:39 WP_Filesystem_Direct::get_contents
        /nas/content/live/xxxxxxx1/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-cache.php:98 RankMath\Sitemap\Cache::get_sitemap
        /nas/content/live/xxxxxxx1/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-sitemap-xml.php:131 RankMath\Sitemap\Sitemap_XML::has_sitemap_in_cache
        /nas/content/live/xxxxxxx1/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-sitemap-xml.php:85 RankMath\Sitemap\Sitemap_XML::output
        /nas/content/live/xxxxxxx1/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-sitemap-xml.php:75 RankMath\Sitemap\Sitemap_XML::__construct
        /nas/content/live/xxxxxxx1/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/class-router.php:78 RankMath\Sitemap\Router::request_sitemap
        /nas/content/live/xxxxxxx1/wp-includes/class-wp-hook.php:287 WP_Hook::apply_filters
        /nas/content/live/xxxxxxx1/wp-includes/class-wp-hook.php:311 WP_Hook::do_action
        /nas/content/live/xxxxxxx1/wp-includes/plugin.php:544 do_action_ref_array
        /nas/content/live/xxxxxxx1/wp-includes/class-wp-query.php:1080 WP_Query::parse_query
        /nas/content/live/xxxxxxx1/wp-includes/class-wp-query.php:1766 WP_Query::get_posts
        /nas/content/live/xxxxxxx1/wp-includes/class-wp-query.php:3448 WP_Query::query
        /nas/content/live/xxxxxxx1/wp-includes/class-wp.php:624 WP::query_posts
        /nas/content/live/xxxxxxx1/wp-includes/class-wp.php:747 WP::main
        /nas/content/live/xxxxxxx1/wp-includes/functions.php:1285 wp
        /nas/content/live/xxxxxxx1/wp-blog-header.php:16 require
        /nas/content/live/xxxxxxx1/index.php:17 [main]

    What solution did you find, please?

    Dani Vera
    Rank Math business

    1 week, 1 day ago and nobody have answers 🙁

    Matthew
    Rank Math business
    Content AI Creator

    Any resolution to these issues?

    i have this error too

Viewing 15 replies - 1 through 15 (of 24 total)

The ticket ‘Sitemap error: error on line 2 at column 84: Extra content at the end of the doc’ is closed to new replies.