Sitemap Plugin (was Google Sitemap Plugin)

Creating and modifying plugins.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: The file sitemap.gz is not created

Post by garvinhicking »

Hi!

Yes, if your server is firewalled, this might cause the whole trackback and pinging services process cause to cease the script's execution.

In that case you can do one of three things:

1. Try to un-firewall you server, so that pings+trackbacks can be sent

2. Disable trackbacks (as described in the FAQ) and remove the weblogping plugin

3. Move the sitemap plugin up in the order of event plugins so that it comes before the weblog-ping plugin.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Fencer
Regular
Posts: 28
Joined: Fri Aug 11, 2006 9:26 am
Contact:

Re: The file sitemap.gz is not created

Post by Fencer »

garvinhicking wrote:Hi!

Yes, if your server is firewalled, this might cause the whole trackback and pinging services process cause to cease the script's execution.

In that case you can do one of three things:

1. Try to un-firewall you server, so that pings+trackbacks can be sent

2. Disable trackbacks (as described in the FAQ) and remove the weblogping plugin

3. Move the sitemap plugin up in the order of event plugins so that it comes before the weblog-ping plugin.

HTH,
Garvin
Thanks, I'll try to change the plugin order. :)

Filip
Boris

Post by Boris »

As sitemap 0.9 is out and will be supported bei Yahoo and MSN too, I've just commited a change to use multiple ping-URLs.
It seems, that the XML-Schema did not change, do my old sitemap validated against ther 0.9-schema.

Additional testing/code-review would be very much appreciated. (you can check it out from CVS or download it from WebCVS if you don't want to wait for the sparctacus-update)


Sadly I don't know if there are any new ping-services yet.
infidelguy
Posts: 3
Joined: Sun Dec 03, 2006 4:25 pm
Location: Atlanta, Georgia
Contact:

Post by infidelguy »

Strange, I had to actually manually create the sitemap.xml.gz chmod to 777 to get it to start saving and sending off to google.
In Reason,

The Infidel Guy
http://www.infidelguy.com
scottwalsh
Regular
Posts: 17
Joined: Sun May 20, 2007 9:05 am
Contact:

Perm Links...

Post by scottwalsh »

Not sure if this of any use to people, but thought it would be useful in the sitemap included perm links to entries (if using that plugin).

Add the following to serendipity_event_google_sitemap.php before the comment:

Code: Select all

// fetch categories and their last entry date (tested with: mysql, sqlite, postgres)
Seems to do the job...

Code: Select all

                    // add possible perm links
                    $permlink = serendipity_db_query(
                            'SELECT value
                               FROM '.$serendipity['dbPrefix'].'entryproperties entryproperties
                              WHERE entryproperties.property = \'permalink\'',
                        false, 'assoc');

                    if (is_array($permlink)) {
                        foreach($permlink as $cur) {
                            $path_quoted = preg_quote($serendipity['serendipityHTTPPath'], '#');
                            $url = $serendipity['baseURL'] . preg_replace("#$path_quoted#", '', $cur['value'],1);
                            $cur_time = ($cur['timestamp']==0)? null : (int)$cur['timestamp'];
                            $this->addtoxml($sitemap_xml, $url, $cur_time, 0.8);
                        }
                    }



Boris, if you think this of use, feel free to put it in the CVS...

Scott
http://zone3.net.nz/
Boris

Re: Perm Links...

Post by Boris »

Scott,

Thanks for your code.
scottwalsh wrote:Seems to do the job...
I did. I just added timestamps to the sql-query (you used it, but it was always 0 :)) and added a warning because the permalink-plugin has to be placed before the sitemap-plugin to work correct. Otherwise the sitemap will possibly miss the lastest entry.

I just commited it to cvs.
scottwalsh
Regular
Posts: 17
Joined: Sun May 20, 2007 9:05 am
Contact:

Re: Perm Links...

Post by scottwalsh »

Boris wrote:I just added timestamps to the sql-query (you used it, but it was always 0 :))
Should have looked closer at that bit... :)

Have noticed that the sitemap doesn't seem to re-generate when you save a static page if you are using that plug in (although does generate the links to the static page if save a normal entry).

Still learning how the hooks to modules work and haven't looked into it futher yet, so can't yet to suggest a change...



Scott
http://zone3.net.nz/
Boris

Re: Perm Links...

Post by Boris »

scottwalsh wrote:Have noticed that the sitemap doesn't seem to re-generate when you save a static page if you are using that plug in
Good catch. It simply didn't use the hooks of the static-pages-plugin, so it wasn't generated on editing static-pages.
If you edit your normal entries the whole sitemap will be rewritten - including static-pages.

I just commited a version, that listens to static-page inserts and updates, but sadly not to delete, as there's no hook for that. Would be nice to have one. :-)
dArignac
Regular
Posts: 11
Joined: Tue Feb 20, 2007 8:23 am
Location: Germany

Post by dArignac »

Hi there,
since the last update to 0.35 I got some error messages within the backend of serendipity. How can I fix them? Btw, Safe-Mode is on.

Code: Select all

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /httpdocs/plugins/serendipity_event_google_sitemap/serendipity_event_google_sitemap.php on line 442
Also for lines 445, 449, 453, 457, 463, 467.
Boris

Post by Boris »

I'm sorry. On my installations I got no warning messages and I wasn't aware, that this is deprecated.

I just commited a fix which should be in the next spartacus-update or you can get it from anonymous CVS, which is now up2date.

Thank you for the report.
dArignac
Regular
Posts: 11
Joined: Tue Feb 20, 2007 8:23 am
Location: Germany

Post by dArignac »

Ok, thanks!
Post Reply