sitemap plugin using wrong baseURL

Having trouble installing serendipity?
Post Reply
neonknight
Regular
Posts: 6
Joined: Mon Mar 14, 2011 4:43 pm

sitemap plugin using wrong baseURL

Post by neonknight »

Hi there

I'm running several instances of s9y on a server using several domains. When I set up one of the blogs, I initially installed it as a subdomain of another domain (e.g. foobar.example.com) and later switched it to its real domain.

The problem is, that serendipity_event_google_sitemap still insists on using the old hostname foobar.example.com instead of www.example.net which is the current and correct host name. There is no reference to foobar.example.com anywhere. I grepped and zgrepped through all my server files, I checked all database entries and also removed all ServerAlias references to the old hostname in the apache config, I double-checked all settings in s9y-admin, logged out and in again to the admin-GUI for several times. I even tried to hardcode the new hostname in the function get_BaseURL() of serendipity_event_google_sitemap.php (and that's the point where I had to give up and post here)!
Of course I also deleted sitemap.xml.gz before creating a new blog entry and made sure to use http://www.example.net/admin and not the old host name in the browser.

So... what do I need to fix to get the correct hostname in my sitemap?

In s9y itself baseURL is always referenced correctly.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: sitemap plugin using wrong baseURL

Post by garvinhicking »

Hi!

You mean, inside your sitemap.xml file you have the old hostname, right? Did you check the filemtime of the sitemap.xml, that it really is a recently updated file and not mabye the old file that has no more write privileges maybe, so that it was never updated?

The plugin uses $serendipity['baseURL'], and that one is stored in the "serendipity_config" database table...the only other way it could be set is through a custom plugin (did you maybe create one?), or through the serendipity_config_local.inc.php file (also only if you custom-modified it). And last, the HTTP host detection would fill it in, but only if you use that hostname...

Regards,
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/
neonknight
Regular
Posts: 6
Joined: Mon Mar 14, 2011 4:43 pm

Re: sitemap plugin using wrong baseURL

Post by neonknight »

Hi Garvin

Thanks for your reply. There's no custom plugin and the file was always freshly created (I rm'ed the existing file on the shell).
But now the problem has been solved. After I updated the plugin to its newest version, the sitemap is now created correctly. Still, the whole story doesn't make much sense to me... but never mind, as long as it works 8)
Post Reply