Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Wrong Sitemap XML-Format (?) of the Google-XML-Sitemap plugin
Avatar
Kalle1887
Member
Free Members
sp_UserOfflineSmall Offline
Feb 23, 2015 - 8:09 am

Hi all,

I use the simple:press Google-XML-Sitemap plugin (in combination with Yoast Wordpress SEO plugin).
At the Google Webmaster tools I get an error because of the date-format.
It`s not e.g. "2015-02-23 12:29" but "1424696380".

You can see the problem here:
http://vogel-beobachtung.de/si....._index.xml

Has anybody an idea how to change this?

 

Thank you very much, Kalle

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 23, 2015 - 8:33 am

I think you need to update it to the latest version. Should be in your WordPress updates list.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Kalle1887
Member
Free Members
sp_UserOfflineSmall Offline
Feb 23, 2015 - 9:15 am

Hi Yellow Swordfish,

thank you very much, but I use simple:press Version 5.5.4 and Google XML-Sitemap 2.3.2.
I think these are the newest versions?

 

Best regards, Kalle

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 23, 2015 - 9:24 am

Curious... Are you using the most recent version of Yoast as well?

A user reported a problem with dates prior to our 5.5.4 release which was fixed and released in the GSP 2.3.2 release and verified as corrected at that time. 

andy-signature.png
YELLOW
SWORDFISH
Avatar
Kalle1887
Member
Free Members
sp_UserOfflineSmall Offline
Feb 23, 2015 - 9:50 am

Yes, also Yoast is the newest version.

A weird thing is:

If I have a look at: http://vogel-beobachtung.de/si....._index.xml

...the time format is in the "wrong" format, but if I visite:

http://vogel-beobachtung.de/fo.....itemap.xml

..the format is well. Might that be a bug?

 

Best regards, Kalle

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 23, 2015 - 11:45 am

I am sorry to say that our Google Sitemap, SEO and Yoast team member is on vacation at the moment so I am ill-equipped to know. I am going to find the thread that raised the date issue in the first place to see if there is any information that might help. Will post back in a little while.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 23, 2015 - 11:48 am

here is the thread: https://simple-press.com/suppo.....te-format/

I don't know if that helps but does it sound like a similar issue? The latest code you are using does have this change in it.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Kalle1887
Member
Free Members
sp_UserOfflineSmall Offline
Feb 23, 2015 - 12:07 pm

HI Yellow Swordfish,

 

thank you very much. That was a good help.

 

I changed:

function sp_google_sitemap_do_generate_yoast_main() {
    $map = '';

    $base = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : '';
    $date = spdb_table(SFPOSTS, '', 'UNIX_TIMESTAMP(post_date)', 'post_date DESC', '1');
    $map.= '<sitemap>'."
";
    $map.= '<loc>'.home_url($base.'forum-sitemap.xml').'</loc>'."
";
    $map.= '<lastmod>'.date($date).' </lastmod>'."
";
    $map.= '</sitemap>' . "
";

    return $map;
}

 

Into:

 

function sp_google_sitemap_do_generate_yoast_main() {
    $map = '';

    $base = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : '';
    $date = spdb_table(SFPOSTS, '', 'UNIX_TIMESTAMP(post_date)', 'post_date DESC', '1');
    $map.= '<sitemap>'."
";
    $map.= '<loc>'.home_url($base.'forum-sitemap.xml').'</loc>'."
";
    $map.= '<lastmod>'.htmlspecialchars(date('c', $date)).'</lastmod>'."
";
    $map.= '</sitemap>' . "
";

    return $map;
}

 

...now it works :-)

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 23, 2015 - 12:26 pm

Wow! That IS good news. I will pass this thread on to @mr-papa when he returns...

Thanks for the update and glad it was easily sorted.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 4, 2015 - 8:23 pm

odd.. at first blush (and just back from 2 week cruise!), not sure why the change would be needed...

but will investigate it...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625