Support » Plugin: Yoast SEO » Invalid date in sitemaps

  • Resolved petervanderdoes

    (@petervanderdoes)


    WordPress version: 3.5.1
    WordPress SEO version: 1.4.9

    The categories loc has a wrong format of the lastmod date. Both standard and custom posts categories.

    <sitemap>
    <loc>http://www.foo.com/event-sitemap.xml</loc>
    <lastmod>2013-06-06T00:47:57+00:00</lastmod>
    </sitemap>
    <sitemap>
    <loc>http://www.foo.com/category-sitemap.xml</loc>
    <lastmod>2013-06-21 03:10:14</lastmod>
    </sitemap>
    <sitemap>
    <loc>http://www.foo.com/event-categories-sitemap.xml</loc>
    <lastmod>2013-06-06 00:47:57</lastmod>
    </sitemap>
    <sitemap>
    <loc>http://www.foo.com/author-sitemap.xml</loc>
    <lastmod>2013-06-21T10:37:38+00:00</lastmod>
    </sitemap>

    http://wordpress.org/extend/plugins/wordpress-seo/

Viewing 15 replies - 1 through 15 (of 16 total)
  • petervanderdoes

    (@petervanderdoes)

    It’s not just categories, just checked the code, it’s all taxonomies. I just don’t have tags on my site.

    I also believe the date will be wrong if you limit the amount of entries and the entry is hit, or you just have one post

    From the code lines 187-189 in class-sitemaps.php:

    if ( empty( $count ) || $count == $n ) {
    	$date = $this->get_last_modified( $post_type );
    } else {

    A solution is to move line 191

    $date = date( 'c', strtotime( $date ) );

    below line 192.

    jayo

    (@jayo)

    Tried this… didnt seem to work.

    Any other suggestions?

    petervanderdoes

    (@petervanderdoes)

    Instead of moving the line, copy that line below line 188.

    jayo

    (@jayo)

    Thanks Peter, getting same result…

    Errors when I test in Google webmaster tools.

    mdidesign

    (@mdidesign)

    Any news? I have the same problem. The tags in the sitemap show up wrong lastmod dates. The “T” is missing. This should be fixed. Webmaster Tools is reportimg issues.

    petervanderdoes

    (@petervanderdoes)

    I haven’t heard anything, not seen any update.

    SEO Version: 1.4.10

    petervanderdoes

    (@petervanderdoes)

    Add this

    $date = date( 'c', strtotime( $date ) );

    Before line 259

    $this->sitemap .= '<sitemap>' . "\n";

    I will try that out. I do not understand why Yoast dors not fix that issue.

    Hello guys, I’ve detected the same issue from a Google Webmasters alert. The dates are bad formatted for taxonomies other than post or pages. It’s simply a typo error in the code. Hope this may be fixed soon since it’s a easy to fix glitch.

    Same here. I excluded taxonomies from SEO – hence no errors 🙂
    It seems like Yoast is not really a frequent guest here unfortunately…

    Yoast is reading this, you can be sure 😉

    Well, hope he fixes it soon, as it is an important function, same with the one whose issue was additional text in the title, and whatever is there that may affect SEO (the main reason we use this plugin) …

    Then maybe I can upgrade to the new version 🙂

    Forgetting an entire function call is not a typo as far as I’m considered.

    And for others reading this, you have to do both code changes, http://wordpress.org/support/topic/invalid-date-in-sitemaps?replies=11#post-4333053 and http://wordpress.org/support/topic/invalid-date-in-sitemaps?replies=11#post-4345799

    The next release of the plugin will fix this, the fixes are implemented in the github repository.

    After the Update of 1.4.11 the WMT give me a 404 Error for the sitemaps.

    @hovida I don’t have that problem and the problem isn’t related to this original problem of this thread. Please start a new thread

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Invalid date in sitemaps’ is closed to new replies.