WordPress.org

Ready to get started?Download WordPress

Forums

Google XML Sitemaps
[resolved] error on line 2 at column 1: Extra content at the end of the document (9 posts)

  1. Mukesh Kumar
    Member
    Posted 2 years ago #

    when i update wordpress 3.3 than the following error found plz help...

    This page contains the following errors:

    error on line 2 at column 1: Extra content at the end of the document
    Below is a rendering of the page up to the first error.

    http://wordpress.org/extend/plugins/google-sitemap-generator/

  2. Mukesh Kumar
    Member
    Posted 2 years ago #

    Also i am see on firebox and enternet explore

    XML Parsing Error: junk after document element
    Location: http://mukesh.co/sitemap.xml
    Line Number 2, Column 1:<b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/mukeshco/public_html/wp-includes/query.php</b> on line <b>2746</b>
    ^

  3. henri
    Member
    Posted 2 years ago #

    Same problem...

  4. henri
    Member
    Posted 2 years ago #

    in /wp-includes/query.php change this

    // Always sanitize
    		foreach ( $this->posts as $i => $post ) {
    			$this->posts[$i] = sanitize_post( $post, 'raw' );
    		}

    to

    // Sanitize before caching so it'll only get done once
    		for ( $i = 0; $i < $this->post_count; $i++ ) {
    			$this->posts[$i] = sanitize_post($this->posts[$i], 'raw');
    		}

    Poor hack I know!

  5. henri
    Member
    Posted 2 years ago #

    Or remove those lines it works too

  6. Mukesh Kumar
    Member
    Posted 2 years ago #

    Thanks Henri its... working....

  7. henri
    Member
    Posted 2 years ago #

    Sure but don't know the collateral damages in wordpress...

  8. arnee
    Member
    Plugin Author

    Posted 2 years ago #

  9. henri
    Member
    Posted 2 years ago #

    Thanks arne it works perfectly!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic