sitemap not work

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
yyok
Regular
Posts: 7
Joined: Thu May 25, 2006 9:12 pm

sitemap not work

Post by yyok »

I have installed the google sitemap plugin few days ago,
when I went to http://www.google.com/webmasters/sitemaps/
and check sitmaps,there is no sitemap here.
But every time I post my article,it report :Sent sitemap update to Google.

And, when I manually add the sitemap.xml.gz locate in the root directory of my site to google sitemap..It report an error in my sitemap file. The time format was incorrect..

Here is a part from sitemap.xml.gz file:

<url>
<loc>http://www.lbus.net/index.php?/archives ... .html</loc>
<lastmod>2006-05-31TZ</lastmod>
<priority>0.7</priority>
</url>

"2006-05-31TZ", is that right. I think it should be "2006-05-31T"
Boris

Re: sitemap not work

Post by Boris »

yyok wrote:"2006-05-31TZ", is that right. I think it should be "2006-05-31T"
"2006-05-31" would be the right way to specify a date only in W3C Datetime format. T indicates the start of the time and Z means GMT/UTC.

It's odd, that you have no time between T and Z. Normally there should be the time of your posting, but it's empty for you. I can't think of a way this could happen.

Code: Select all

        if ($lastmod!=null) {
            $str_lastmod = gmstrftime('%Y-%m-%dT%TZ', $lastmod);
            $str .= "\t\t<lastmod>$str_lastmod</lastmod>\n";
        }
If $lastmod is anything other than int, gmstrftime gives me an error and returns nothing. If $lastmod is an int, the function always returns a full string for me.

Any ideas, Garvin?
Boris

Post by Boris »

I just saw your site is japanese and on an IIS, so I guess it's a windows-system.
Perhaps it has something to do with this issue. Sadly the link there is not working.

Only a guess.
Boris

Post by Boris »

I think I got it: This posting says, that %T is not supportet in win32.

Please try and replace

Code: Select all

$str_lastmod = gmstrftime('%Y-%m-%dT%TZ', $lastmod);
with

Code: Select all

$str_lastmod = gmstrftime('%Y-%m-%dT%H:%M:%SZ', $lastmod);
in line 66 of your plugins/serendipity_event_google_sitemap/serendipity_event_google_sitemap.php. If this works, I'll fix the plugin.
yyok
Regular
Posts: 7
Joined: Thu May 25, 2006 9:12 pm

Post by yyok »

Thank you Boris, the time format is correct now.

But, another problem,
when I enter www.google.com/webmasters/sitemaps/
there was nothing added.
Boris

Post by Boris »

yyok wrote:But, another problem,
when I enter www.google.com/webmasters/sitemaps/
there was nothing added.
Did you only used the link from the admin-backend of s9y to announce your sitemap to google?

IIRC the sitemap does not show up in the Google-Interface in this case. You'll have to add it once in the Google-Interface and then it should fetch the sitemap regularly.
Post Reply