Jump to content
Chemo

[CONTRIBUTION] Google XML Sitemap Feed - by Chemo

Recommended Posts

Thanks for cbp, I have now applied his fix to display ALL categories (whether there are actual products in them or not). It is in the contrib area now. (I simply commented out the code and added the new code underneath, incase you want to change it back yourself, but im assuming most people wont want to change it back).

 

Regards,

Chris

Share this post


Link to post
Share on other sites

By far the easiest contrib I've ever installed - thanks to Chemo and Chris for the amazing work! Sure says something that Chemo continues to share his great contribs even without access to the board. Thanks for making osC easier for the rest of us! :thumbsup:

Edited by CCTVcams

Share this post


Link to post
Share on other sites

hi Chris, i upload your new files and every thing ok, but i dont understand how i do to notify google, because in my old version i do this http://sat25.com/googlesitemap/index.php and generate a code, i then notify google but now i dont have no clue.

 

Ps: google give me a site map error "General HTTP error General HTTP error: 404 (Not found) "

 

how i can fix this too, can you help me, please!

 

best regards

Share this post


Link to post
Share on other sites
hi Chris, i upload your new files and every thing ok, but i dont understand how i do to notify google, because in my old version i do this http://sat25.com/googlesitemap/index.php and generate a code, i then notify google but now i dont have no clue.

 

Ps: google give me a site map error "General HTTP error General HTTP error: 404 (Not found) "

 

how i can fix this too, can you help me, please!

 

best regards

 

Firstly, these new sitemaps (the On The Fly ones) do NOT generate any new files like the old version did.

To notify google, go to www.google.com/webmasters/sitemaps/ and login there and submit the URL's to the googlesitemap php files.

So you will submit something like www.sat25.com/googlesitemapproducts.php, and www.sat25.com/googlesitemapcategories.php and so on. Yes... you submit to google the PHP files as this contrib does NOT create .XML files.

 

However, I just tried going to www.sat25.com/googlesitemapproducts.php and it doesn't seem to exist. Where have you copied the files to?

 

Regards,

Chris

Share this post


Link to post
Share on other sites
hi chris, thanks for the help now its working only two files give me an error: http://sat25.com/googlesitemaptopics.php and http://sat25.com/googlesitemaparticles.php , how i can fix this, the rest i thing its ok.

 

i notice google send me this errors to :

 

Leading whitespace

 

We've detected that your Sitemap file begins with whitespace. We've accepted the file, but you may want to remove the whitespace so that the file adheres to the XML standard.

 

XML files should begin with the XML declaration that specifies the version of XML being used. If you see this error, we've detected that your Sitemap begins with whitespace. We have accepted the Sitemap, but display the error so that you can modify your Sitemap (by removing the whitespace) to adhere to the standard.

 

 

thanks man my best regards

Share this post


Link to post
Share on other sites
hi chris, thanks for the help now its working only two files give me an error: http://sat25.com/googlesitemaptopics.php and http://sat25.com/googlesitemaparticles.php , how i can fix this, the rest i thing its ok.

 

thanks man my best regards

 

Hi,

 

I am glad that things are working for you. I dont know what the go is with the blank spaces. I haven't had it happen on my own sitemaps, so I have no idea. Sorry. At least they are accepting them anyway.

 

As for the topics and articles sitemaps, do you have any articles on your website? You get those errors when it does the queries and finds no data.

 

Regards,

Chris :)

Share this post


Link to post
Share on other sites

Hi All,

 

I downloaded the Google XML Sitemap Feed v1.3 by Chemo. I installed the contribution on my website's root directory with 777 permission. Actually, I installed it on "/public_html/" subfolder which provided by my webhosting serivce provider.

When i tried the URL http://www.monstech.com/googlesitemap/index.php, an error is occured.

Hope someome can help me.

Besides, my website is also running the Ultimate SEO 2.1d by Chemo too.

 

 

Error:

------------------------------------------------------------------------------------------

Warning: fopen(/public_html/sitemapproducts.xml) [function.fopen]: failed to open stream: No such file or directory in /home/monstech/public_html/googlesitemap/sitemap.class.php on line 291

ERROR: Google Product Sitemap Generation FAILED!

 

 

Warning: fopen(/public_html/sitemapcategories.xml) [function.fopen]: failed to open stream: No such file or directory in /home/monstech/public_html/googlesitemap/sitemap.class.php on line 291

ERROR: Google Category Sitemap Generation FAILED!

 

 

Warning: fopen(/public_html/sitemapindex.xml) [function.fopen]: failed to open stream: No such file or directory in /home/monstech/public_html/googlesitemap/sitemap.class.php on line 291

ERROR: Google Sitemap Index Generation FAILED!

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 141

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 179

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /public_html/sitemapproducts.xml

[status] => failure

[file_exists] => false

)

 

[1] => Array

(

[file] => /public_html/sitemapcategories.xml

[status] => failure

[file_exists] => false

)

 

[2] => Array

(

[file] => /public_html/sitemapindex.xml

[status] => failure

[file_exists] => false

)

 

)

 

)

---------------------------------------------------------------------------------------------------

Share this post


Link to post
Share on other sites
Hi All,

 

I downloaded the Google XML Sitemap Feed v1.3 by Chemo. I installed the contribution on my website's root directory with 777 permission. Actually, I installed it on "/public_html/" subfolder which provided by my webhosting serivce provider.

When i tried the URL http://www.monstech.com/googlesitemap/index.php, an error is occured.

Hope someome can help me.

Besides, my website is also running the Ultimate SEO 2.1d by Chemo too.

 

Hi,

 

Try using the NEW On the Fly Sitemap generators. They are MUCH better than the old one, and they are MUCH MUCH easier to get running.

 

So give the new one a try and let us know how it goes.

 

Cheers,

Chris

Share this post


Link to post
Share on other sites

i just solve my problem, but not sure it is correct or not.

 

after installed the contribution on the website,

in file sitemap.class.php around line 255 find:-

----------------------------------------------

function GoogleSitemap($host, $user, $db, $pass){

$this->DB = new MySQL_Database($host, $user, $db, $pass);

$this->filename = "sitemap";

$this->savepath = DIR_FS_CATALOG;

$this->base_url = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

$this->debug = array();

} # end class constructor

 

---------------------------------------------

change

DIR_FS_CATALOG to the absolut path of the website location which provided by your own webhosting service company. (e.g. "/home/domain_name/catalog")

for me, I changed to

$this->savepath = "/home/domain_name/public_html/";

 

please correct me if it is wrong...

Share this post


Link to post
Share on other sites

Hi Everybody,

 

I've installed the "On the fly Google Sitemap Generator" , (version 1.2 in the file)., but it s the last update avaible here by stonebridgecomputing ( 13th july 2006)

 

The script seems to work very nice. No visible errors, and all tags seems to fullfill Google requirements.

 

So i ve put both link into my Google site map interface :

 

http://www.hoaly-paris.com/googleSitemapCategories.php

http://www.hoaly-paris.com/googleSitemapProducts.php

 

And few hours later, i got an Error : File format is unsupported.

http://www.google.com/support/webmasters/b...py?answer=35141

 

I read this, but i didn't find any solution .

 

Question : Is the "php" extension source of the problem ?

 

Thx,

Share this post


Link to post
Share on other sites
Hi Everybody,

 

I've installed the "On the fly Google Sitemap Generator" , (version 1.2 in the file)., but it s the last update avaible here by stonebridgecomputing ( 13th july 2006)

 

The script seems to work very nice. No visible errors, and all tags seems to fullfill Google requirements.

 

So i ve put both link into my Google site map interface :

 

http://www.hoaly-paris.com/googleSitemapCategories.php

http://www.hoaly-paris.com/googleSitemapProducts.php

 

And few hours later, i got an Error : File format is unsupported.

http://www.google.com/support/webmasters/b...py?answer=35141

 

I read this, but i didn't find any solution .

 

Question : Is the "php" extension source of the problem ?

 

Thx,

 

You seem to have a big error when it is run now. I just went to http://www.hoaly-paris.com/googleSitemapCategories.php and it gave me the following errors:

 

-----------------------

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home.10.2/mecatrad/www/hoalypar/includes/application_top.php on line 288

 

Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/usr/local/lib/php') in /home.10.2/mecatrad/www/hoalypar/includes/application_top.php on line 288

-----------------------

 

I dont know why those errors are happening, but it wouldn't be to do with this contrib. It must be something further.

 

Looking at the errors closer, you will notice it cannot open "includes/languages/.php" That is your error. It is NOT meant to have that forward slash there before the '.php'.

 

Your whole website seems to be bringing the same error, so it is probably a change you made in application_top.php or filenames.php or something like that.

After you fix that error, test the sitemaps again and then submit to google.

 

Cheers,

Chris

Share this post


Link to post
Share on other sites

Excelent and simple to install. Indeed, a great contrib.

 

When I generated the sitemaps, I only got relative paths: something like

en/comedy/theres-something-about-mary.html

instead of

http://www.server-name.com/en/comedy/theres-something-about-mary.html

but that can be fixed very easily if you add (in all files, googleSitemapCategories, googleSitemapProducts, etc) in line that contains $location = ... the absolute path constants HTTP_SERVER and DIR_WS_CATALOG.

 

For example in the Categories file the original line is

$location = tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cID, 'NONSSL', false);

if you also have problems with the link, try something like

$location = HTTP_SERVER . DIR_WS_CATALOG . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cID, 'NONSSL', false);

.

 

And I also did a little modification, so I'd have links for all languages, because they have different content, and in my case I have also the language and product, category or manufacturer name in the url. If you need that too, you can try adding the following code in each file that interests you (I use only googleSitemapCategories.php, googleSitemapManufacturer.php and googleSitemapProducts.php):

 

in each file, at the begining, right after the $sql variable is defined, add the following code:

 

// added for language support
 global $languages_id;
 $old_lang = $languages_id;
 $res_lang = mysql_query("select languages_id from languages");
 $languages_array = array();
 while ($row_lang = mysql_fetch_assoc($res_lang)) $languages_array[] = $row_lang["languages_id"];

 foreach($languages_array as $value){
$languages_id = $value;
// end of add

 

and at the end of each file, before the line

echo '</urlset>';

add:

// added for language support
 } // end for each

 $languages_id = $old_lang; // set back the old language
// end of add

 

...that's it :). For me it worked, because the function tep_href_link (in 'includes/functions/html_output.php') builds the links based on the language ID. So... in case any of you need something similar, this might do the trick :).

 

Best of luck

Share this post


Link to post
Share on other sites
Excelent and simple to install. Indeed, a great contrib.

 

When I generated the sitemaps, I only got relative paths: something like

en/comedy/theres-something-about-mary.html

instead of

http://www.server-name.com/en/comedy/theres-something-about-mary.html

but that can be fixed very easily if you add (in all files, googleSitemapCategories, googleSitemapProducts, etc) in line that contains $location = ... the absolute path constants HTTP_SERVER and DIR_WS_CATALOG.

 

Hey,

 

I dont know why you needed to do that. Something must be strange about your installation, as it works fine for me with the full path.

 

Never mind, at least you got it working.

 

Cheers,

Chris :)

Share this post


Link to post
Share on other sites

Later edit: I miss-spelled a constant... instead of DIR_WS_CATALOG it's DIR_WS_HTTP_CATALOG.

Share this post


Link to post
Share on other sites
Hey,

 

I dont know why you needed to do that. Something must be strange about your installation, as it works fine for me with the full path.

 

Never mind, at least you got it working.

 

Cheers,

Chris :)

 

Well... I manually ran the scripts, and that's how the output looked, without the full path, but with those constants it looked ok, so I figured Google must see it the same way I see it... no ? :).

 

It's a solution that worked for my problem, and since everybody is kind enough to help everybody, I thought someone else might have this problem, so maybe it helpes someone else too :)

 

Probably the full link didn't appear because of the modifications I did arround here... I made some seo links attempts... :). Anyway, the contributions is very easy to understand and to modify, so most people shouldn't have problems with it :)

 

Congratulations again ;)

Share this post


Link to post
Share on other sites
You seem to have a big error when it is run now.

...

 

Well, first of all, i would like to thank you for your help . :)

 

My site was working well on my PC, on my friends PC but i found the cause of errors. I will open a topic about that problem . (Solution was to set a langage site "Defaut", in my case French. ) .

 

Now Google is reading my Site Map. My site is working nice, more page read. :D

 

PS : my site use chemo SEO url rewriting, and Google Site map Contribs (easiest contrib i ve ever used) works well with.

Share this post


Link to post
Share on other sites
Well, first of all, i would like to thank you for your help . :)

 

My site was working well on my PC, on my friends PC but i found the cause of errors. I will open a topic about that problem . (Solution was to set a langage site "Defaut", in my case French. ) .

 

Now Google is reading my Site Map. My site is working nice, more page read. :D

 

PS : my site use chemo SEO url rewriting, and Google Site map Contribs (easiest contrib i ve ever used) works well with.

 

 

Glad to hear that you got the problem sorted out.

 

Yes Chemo's contribs are always the best to use as they were always as easy as possible to install.

 

Cheers,

Chris

Share this post


Link to post
Share on other sites

Hello Stonebridge,

 

Thought I would run something by you... I have installed the files today and was using the old version until now with some slight languages modification.

 

Anyway, works great but google was giving me a whitespace error...

Runninf it in my browser I noticed that if I run it in french I get whitespaces in front of the start of the file, if I run it in english ..no problem !!!

 

Not sure if you seen anything like this before, i am a bit baffled.

 

If you want to have a look check it out at:

http://www.eboutik.net/googleSitemapCatego...php?language=fr

http://www.eboutik.net/googleSitemapCatego...php?language=en

 

Firefox is best to see the error, or XMLSpy...

 

Ho and if you see Chemo, say hello for me, long time not seen him ...

Share this post


Link to post
Share on other sites
Hello Stonebridge,

 

Thought I would run something by you... I have installed the files today and was using the old version until now with some slight languages modification.

 

Anyway, works great but google was giving me a whitespace error...

Runninf it in my browser I noticed that if I run it in french I get whitespaces in front of the start of the file, if I run it in english ..no problem !!!

 

Not sure if you seen anything like this before, i am a bit baffled.

 

If you want to have a look check it out at:

http://www.eboutik.net/googleSitemapCatego...php?language=fr

http://www.eboutik.net/googleSitemapCatego...php?language=en

 

Firefox is best to see the error, or XMLSpy...

 

Ho and if you see Chemo, say hello for me, long time not seen him ...

 

Hi,

 

I dont know why you could be getting the white spaces. IE displays it fine without any whitespaces, and I dont have firefox installed to be able to check it with that.

 

Someone else had the same problem though, but I think they were going to just leave it as Google was accepting it anyway.

 

Sorry but I dont know how to fix it. Maybe someone else on here could help?

 

Regards,

Chris

Share this post


Link to post
Share on other sites

This is a brilliant contrib but I've got a question that is hopefully easy for you guys here that are in the "know".

 

On the advice of various posts within the forum I've set the "mechanics" of my site up as "http://domain.com" rather than using "www" (e.g. for ssl etc. as it will always default to the www.).

 

However, I've marketed and registered the site on various directories as "http://www.domain.com".

 

But when I've registered the sitemap for this contrib with google I'm getting errors because the contrib is listing all the pages under "http://domain.com" but my registration is under "http://www.domain.com".

 

What do I need to fix / change to generate a sitemap with the www prefix ?

Share this post


Link to post
Share on other sites
This is a brilliant contrib but I've got a question that is hopefully easy for you guys here that are in the "know".

 

On the advice of various posts within the forum I've set the "mechanics" of my site up as "http://domain.com" rather than using "www" (e.g. for ssl etc. as it will always default to the www.).

 

However, I've marketed and registered the site on various directories as "http://www.domain.com".

 

But when I've registered the sitemap for this contrib with google I'm getting errors because the contrib is listing all the pages under "http://domain.com" but my registration is under "http://www.domain.com".

 

What do I need to fix / change to generate a sitemap with the www prefix ?

 

Hi,

 

So if I understand this correctly, you have set your site up as http://domain.com and you have set google sitemaps registration up as http://www.domain.com, and because it is set up differently, the sitemap isn't working?

I would honestly just change your whole site to www.domain.com (as that is what everyone would type in anyway), and get your hosting provider to make sure that http://domain.com and http://www.domain.com points to the same place so that you can use either. Then, you will need to change your configure.php file to add the www, and then the googlesitemap files will work with the www. Unfortunately I dont know how to change it otherwise.

Both ways should be working (whether you have the www in or not) anyway.

 

Sorry I cannot help further.

 

Regards,

Chris

Share this post


Link to post
Share on other sites
Hi,

 

So if I understand this correctly, you have set your site up as http://domain.com and you have set google sitemaps registration up as http://www.domain.com, and because it is set up differently, the sitemap isn't working?

I would honestly just change your whole site to www.domain.com (as that is what everyone would type in anyway), and get your hosting provider to make sure that http://domain.com and http://www.domain.com points to the same place so that you can use either. Then, you will need to change your configure.php file to add the www, and then the googlesitemap files will work with the www. Unfortunately I dont know how to change it otherwise.

Both ways should be working (whether you have the www in or not) anyway.

 

Sorry I cannot help further.

 

Regards,

Chris

 

Hi Chris,

 

Thanks for that.

 

Yes, Google wants one or the other, although both types of addresses work. I just wondered if there was a quick way to add the "www" into the sitemap.

 

If it's a case of changing the configure file - I had better get started.......

 

Thanks & have a good weekend.

 

Regards

 

Bob

Share this post


Link to post
Share on other sites

Hi.

 

I'm using the latest 'on the fly' contrib and I can't get the sitemaps working. Every file seem to have an error. For example, when I try to open googleSitemapProducts.php I get:

 

'The following tags were not closed: urlset. Error processing resource 'http://www.anzasklep.pl/googleSitemapProducts.php'.'

 

Google alsoo sees an error:

Parsing error (Line 4) We were unable to read your Sitemap. It may contain an entry we are unable to recognize. Please validate your Sitemap before resubmitting.

 

An help greatly appreciated.

Share this post


Link to post
Share on other sites
Hi.

 

I'm using the latest 'on the fly' contrib and I can't get the sitemaps working. Every file seem to have an error. For example, when I try to open googleSitemapProducts.php I get:

 

'The following tags were not closed: urlset. Error processing resource 'http://www.anzasklep.pl/googleSitemapProducts.php'.'

 

Google alsoo sees an error:

Parsing error (Line 4) We were unable to read your Sitemap. It may contain an entry we are unable to recognize. Please validate your Sitemap before resubmitting.

 

An help greatly appreciated.

 

Looks like Google only wants xml extensions for these files. Even if the contrib renders an XML.

What I did is run the files in my browser, then view source and save as xml and resubmitted to google... but we just lost the most inteseting aspect of the system: not dynamic, not automated anymore...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×