GetSimple Support Forum

Full Version: sitemap.xml generation bug?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi GS community,

Firstly, excuse any typos or bad grammar as its well past bed time Wink . Have just discovered something that doesnt appear correct w/ the sitemap.xml generation.

If you are running your GS installation from somewhere other than the root dir of your site and perhaps using some .htaccess tricks to hide this, you might also in the Settings page have defined a WebsiteURL that goes against the URL GS suggests (which you must do)

Problem appears to be that when generating a sitemap.xml, all the URL's within the <loc> tags are ignorant of the WebsiteURL configured in the Settings page. (which is of coz not desirable for submitting to google etc)

Chris or someone, can you confirm im not just too tired? If this is actually a problem can it be officially fixed by someone on the team as i sure its a very minor patch? Alternatively, if it is a change needed and noone has the time investigate, im happy to make the changes and commit them... where/how to do?

Cheers all,
Zig


Tested under GS3.1
(someone please correct me if ive missed something obvious)
i've never heard of this before. i will have to verify...
Tnx Chris,

In my particular situation, GS has been installed into "webroot"/cms/ and am using an .htaccess file verbatim as i contributed to the wiki.

If it helps verify things, in the settings page ive defined the WebsiteURL as "http://www.domain.com/" (lacking the "/cms/") so as to ensure all get_page_slug()'s dont include the "/cms" etc.

What i am seeing is that when generating the sitemap.xml, the "/cms/" bit is being included into the <loc> tags. It's as if the 'suggested' url from the Settings page is being used for <loc> in the sitemap.xml and not the defined WebsiteURL from the Settings page.

Regards,
Zig
hmm... the code uses find_url() which is how we generate ALL site links through out the site:

http://code.google.com/p/get-simple-cms/...s.php#1074
Hi Chris,

No idea what was happening... but its all good now. Sitemap.xml generation is working perfectly.

Cheers!