Jump to content
Jack_mcs

Google XML Sitemap SEO

Recommended Posts

I'm still getting the below error.

I try replacing the XML with blank files.

I try checking the sitemap.class.php but both solution did not resolve this problem.

the admin/configuration has disappeared when this error occur.

The only way to get it back is to run the SQL comment again. The Admin link will reappear but show a duplicate of everything.

 

Hi,

 

Switch to sitemap.class_Alternate.php with name change.


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites
Hi, see my post @ #371

 

Seems you have the exact same problem that I had

 

Hope it helps

Hi

Will try but a little confused as my admin are set to true for all the other sitemaps & they are all being written to correctly just not the index one?

Thanks

Helps with post no. too :)

Share this post


Link to post
Share on other sites

That is strange.

 

My fix should only work / write the index file if the options in the admin are all set to false

 

However, we can try it and change it if needed to work for you.

 

1. Add my fix to your file. Try creating the sitemaps.

 

if the sitemapindex has no lines

 

2. Try setting the 3 sitemaps in the admin options to false and generate your sitemaps again.

 

if it works then

 

3. Replace the function with the following

 

	function GenerateSitemapIndex(){
	$content = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
	$content .= '<?xml-stylesheet type="text/xsl" href="gss.xsl"?>' . "\n"; //human readable
	$content .= '<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">' . "\n";		

	// Added by uksitebuilder to fix sitemapindex write when no extra sitemaps are set to true in the config
	$iscompressed = (defined('GOOGLE_SITEMAP_COMPRESS')?(GOOGLE_SITEMAP_COMPRESS == 'true'?'.gz':''):'');
	$content .= "\t" . '<sitemap>' . "\n";
	$content .= "\t\t" . '<loc>'.$this->base_url . 'sitemapcategories.xml'.$iscompressed.'</loc>' . "\n";
	$content .= "\t\t" . '<lastmod>'.date ("Y-m-d", filemtime($this->savepath . 'sitemapcategories.xml'.$iscompressed)).'</lastmod>' . "\n";
	$content .= "\t" . '</sitemap>' . "\n";				   
	$content .= "\t" . '<sitemap>' . "\n";
	$content .= "\t\t" . '<loc>'.$this->base_url . 'sitemapproducts.xml'.$iscompressed.'</loc>' . "\n";
	$content .= "\t\t" . '<lastmod>'.date ("Y-m-d", filemtime($this->savepath . 'sitemapproducts.xml'.$iscompressed)).'</lastmod>' . "\n";
	$content .= "\t" . '</sitemap>' . "\n";
	// End of addition by uksitebuilder

	$pattern = defined('GOOGLE_SITEMAP_COMPRESS')
				 ?	GOOGLE_SITEMAP_COMPRESS == 'true'
						 ?	"{sitemap*.xml.gz}"
						:	 "{sitemap*.xml}"
				 :	"{sitemap*.xml}";
	foreach ( glob($this->savepath . $pattern, GLOB_BRACE) as $filename ) {
	   if ( eregi('index', $filename) ) continue;
	   if ( eregi('manufacturers', $filename) && GOOGLE_XML_SITEMAP_CREATE_MANU != 'true' ) continue;
	   if ( eregi('pages', $filename) && GOOGLE_XML_SITEMAP_CREATE_PAGES != 'true' ) continue;
	   if ( eregi('specials', $filename) && GOOGLE_XML_SITEMAP_CREATE_SPECIALS != 'true' ) continue;
	   $content .= "\t" . '<sitemap>' . "\n";
	   $content .= "\t\t" . '<loc>'.$this->base_url . basename($filename).'</loc>' . "\n";
	   $content .= "\t\t" . '<lastmod>'.date ("Y-m-d", filemtime($filename)).'</lastmod>' . "\n";
	   $content .= "\t" . '</sitemap>' . "\n";				   
	} # end foreach
	$content .= '</sitemapindex>';
	return $this->SaveFile($content, 'index');
} # end function

 

Hope it helps

Edited by uksitebuilder

Share this post


Link to post
Share on other sites

Thanks for all your help uksitebuilder.

Did the first bug fix as stated, but didn't need to do anymore as my hosts finally fixed the server settings & it is all working well! :) Now to re-submit to Google as they tried it whilst waiting for this fix, so my account shopws sitemap errors :(

Share this post


Link to post
Share on other sites

Hello everyone,

 

I recently just installed this amazing mod and it seems as though everything went fine.

 

However, I uploaded my "sitemapindex.xml" onto google 4 days ago and it still has not updated the information on 'URLs submitted' or 'Indexed URLs'.

 

I am assuming that the process takes a while but does anyone know around how long it should take? What are the factors that determine how long it takes?

 

Also, is it correct that I only have to upload "sitemapindex.xml"?

 

Thank you very much.

Share this post


Link to post
Share on other sites
Hello everyone,

 

I recently just installed this amazing mod and it seems as though everything went fine.

 

However, I uploaded my "sitemapindex.xml" onto google 4 days ago and it still has not updated the information on 'URLs submitted' or 'Indexed URLs'.

 

I am assuming that the process takes a while but does anyone know around how long it should take? What are the factors that determine how long it takes?

 

Also, is it correct that I only have to upload "sitemapindex.xml"?

 

Thank you very much.

Google says to allow 24 hours for the site maps to be updated but, in reality, it usually happens in under an hour. You can't just upload the sitemap file(s). You have to create an entry in your googlebase account for the ones you want to use. While you can get away with just uploading the sitemapindex file, they all should be added (all the ones you use) for better results.

 

Jack

Share this post


Link to post
Share on other sites

Hi people I have followed instructions included with this add-on along with a rough guide of adding contributions from Sam: http://forums.oscommerce.com/index.php?sho...=0#entry1432157 which has helped me a lot so far but I have run into this after doing steps 1-3 in the read me file I go to my admin panel to configure the add-on and it brings up the 'Google XML sitemap feed documentation' not my admin panel I have a massive feeling I did something not right but don't know how to find it? :huh:

Share this post


Link to post
Share on other sites

I'm not sure what you mean by going into admin since you didn't provide details but my guess is that you are referring to the shop where you enter www.yourdomain.com/googlesitemap/. If you don't add index.php to the end of that, it will use index.html (or many servers) and that loads the instructions.

 

Jack

Share this post


Link to post
Share on other sites

Hi,

 

I am trying to add google sitemap to my website, i have downloaded googlexml_sitemap_seo_v_1.3 contribution.

I am following the Installation: but i am stuck on one bit.

"Run the included google_xml_sitemap_seo.sql file using phpmyadmin". I am not sure how to do it.

 

I have searched everywhere but can not find the answer

Could someone please give me a nudge in the right direction.

Thanks in advance.

Share this post


Link to post
Share on other sites

Hi.

 

Thanks for the contribution - I managed to install this contribution on my demo site no problems..however due to my oscommerce installation residing in the root directory on my live site I seem to have some strange paths on my site maps..

 

e.g.

http://mysite.co.uk/./sitemapindex.xml

 

 

http://mysite.co.uk/./index.php?cPath=1

 

 

notice the '/./' in the paths...

 

To make this clear I have the xml files in installed under : mysite.co.uk / httpdocs

 

e.g.

 

mysite.co.uk/httpdocs/sitemapcategories.xml

mysite.co.uk/httpdocs/sitemapindex.xml

 

 

rather than mysite.co.uk/httpdocs/oscommerce/sitemapcategories.xml...

 

Hope someone can give me some pointers on this one..

Share this post


Link to post
Share on other sites

There seems to be a problem with how the site is setup or how yu are describing it. The httpdocs directory is not something that can be seen from the web, unless you actually created a directory by that name. I suggest you take a look at this thread to try to sort out the configuration problems.

 

Jack

Share this post


Link to post
Share on other sites
There seems to be a problem with how the site is setup or how yu are describing it. The httpdocs directory is not something that can be seen from the web, unless you actually created a directory by that name. I suggest you take a look at this thread to try to sort out the configuration problems.

 

Jack

 

 

I forgot to say I have a root install...Im sure its ok?

Share this post


Link to post
Share on other sites

Hey,

 

Well, I now uploaded "sitemapindex.xml", "sitemapproducts.xml", and "sitemapcategories.xml" to my catalog and I have also submitted them to the sitemap area of my google account.

 

When you say "You have to create an entry in your googlebase account for the ones you want to use", this is what you meant right?

 

However, once I did this, out of 1635 urls, 0 are indexed.

 

A sample of one of my category urls is: www.mysite.com/xxx-xxx-xxxx-xxxx-c-23.html

 

A sample of one of my product urls is: www.mysite.com/xxxx-xxxx-xxx.p-2680.html

 

Does anyone know what I possibly might have done wrong?

 

Thanks a lot.

 

 

Google says to allow 24 hours for the site maps to be updated but, in reality, it usually happens in under an hour. You can't just upload the sitemap file(s). You have to create an entry in your googlebase account for the ones you want to use. While you can get away with just uploading the sitemapindex file, they all should be added (all the ones you use) for better results.

 

Jack

Share this post


Link to post
Share on other sites

Google provides a reason as to why the links were not accepted. You have to look through there to see what the problem is.

 

Jack

Share this post


Link to post
Share on other sites
I'm not sure what you mean by going into admin since you didn't provide details but my guess is that you are referring to the shop where you enter www.yourdomain.com/googlesitemap/. If you don't add index.php to the end of that, it will use index.html (or many servers) and that loads the instructions.

 

Jack

 

By going in to the admin panel I mean www.mysite.co.uk/admin, then it comes up with the document feed page I think I may have uploaded all the catalog files into the wrong place where do they need to be put to run correctly?

Share this post


Link to post
Share on other sites
Hi,

 

I am trying to add google sitemap to my website, i have downloaded googlexml_sitemap_seo_v_1.3 contribution.

I am following the Installation: but i am stuck on one bit.

"Run the included google_xml_sitemap_seo.sql file using phpmyadmin". I am not sure how to do it.

 

I have searched everywhere but can not find the answer

Could someone please give me a nudge in the right direction.

Thanks in advance.

 

Go to the phpmyadmin in your cpanel and select contents of the sql folder contained in the download and paste in to the box and press run.

Share this post


Link to post
Share on other sites
By going in to the admin panel I mean www.mysite.co.uk/admin, then it comes up with the document feed page I think I may have uploaded all the catalog files into the wrong place where do they need to be put to run correctly?

None of the files get loaded into admin. The contribution has the files to be uploaded in a directory named catalog. That is a general location standing for the root of your shop. You may not have a catalog directory. If files were to be uploaded into admin, there would be an admin directory in the catalog directory. This is the case with most, if not all, contributions.

 

Jack

Share this post


Link to post
Share on other sites
I forgot to say I have a root install...Im sure its ok?

 

 

here is the output from the sitemap gerneator... do you guys think I should have installed oscommerce within a folder...

 

i think the problem is **WS_CAT ./ **

 

 

Opening /var/www/vhosts/mysite.co.uk/httpdocs/sitemapproducts.xml

FS_CAT /var/www/vhosts/mysite.co.uk/httpdocs/googlesitemap

Server http://mysite.co.uk/

Save Path /var/www/vhosts/mysite.co.uk/httpdocs/

WS_CAT ./

Write /var/www/vhosts/mysite.co.uk/httpdocs/sitemapproducts.xml

Generated Google Product Sitemap Successfully

 

Opening /var/www/vhosts/mysite.co.uk/httpdocs/sitemapcategories.xml

FS_CAT /var/www/vhosts/mysite.co.uk/httpdocs/googlesitemap

Server http://mysite.co.uk/

Save Path /var/www/vhosts/mysite.co.uk/httpdocs/

WS_CAT ./

Write /var/www/vhosts/mysite.co.uk/httpdocs/sitemapcategories.xml

Generated Google Category Sitemap Successfully

 

Opening /var/www/vhosts/mysite.co.uk/httpdocs/sitemappages.xml

FS_CAT /var/www/vhosts/mysite.co.uk/httpdocs/googlesitemap

Server http://mysite.co.uk/

Save Path /var/www/vhosts/mysite.co.uk/httpdocs/

WS_CAT ./

Write /var/www/vhosts/mysite.co.uk/httpdocs/sitemappages.xml

Generated Google Pages Sitemap Successfully

 

Opening /var/www/vhosts/mysite.co.uk/httpdocs/sitemapindex.xml

FS_CAT /var/www/vhosts/mysite.co.uk/httpdocs/googlesitemap

Server http://mysite.co.uk/

Save Path /var/www/vhosts/mysite.co.uk/httpdocs/

WS_CAT ./

Write /var/www/vhosts/mysite.co.uk/httpdocs/sitemapindex.xml

Generated Google Sitemap Index Successfully

 

CONGRATULATIONS! All files generated successfully.

 

If you have not already submitted the sitemap index to Google click the link below.

Before you do I HIGHLY recommend that you view the XML files to make sure the data is correct.

 

http://www.google.com/webmasters/sitemaps/...itemapindex.xml

 

For your convenience here is the CRON command for your site:

php /var/www/vhosts/mysite.co.uk/httpdocs/googlesitemap/index.php

 

Here is your sitemap index: http://mysite.co.uk/./sitemapindex.xml

Here is your product sitemap: http://mysite.co.uk/./sitemapproducts.xml

Here is your category sitemap: http://mysite.co.uk/./sitemapcategories.xml

Here is your pages sitemap: http://mysite.co.uk/./sitemappages.xml

Share this post


Link to post
Share on other sites

Me again!

 

My Articles do not seem to be generating.

 

The only reference I get in my site map is;

 

sitemappages.xml

 

articles.php?tPath=2

articles.php?tPath=3

articles.php?tPath=4

 

plus the normal

 

article-submit.php

article-topics.php

article_info.php

article_reviews_info.php

article_reviews_write.php

articles.php

articles_new.php

 

Secondly, articles.php?tPath=2 is not rewritten :S if you click it then it rewrites the URL and the correct page is displayed.

 

Any thoughts?

 

Thanks

Share this post


Link to post
Share on other sites
here is the output from the sitemap gerneator... do you guys think I should have installed oscommerce within a folder...

 

i think the problem is **WS_CAT ./ **

That is the DIR_WS_HTTP_CATALOG in the configure file. Please ask further questions regarding this in the appropriate support thread.

 

Jack

Share this post


Link to post
Share on other sites
Secondly, articles.php?tPath=2 is not rewritten :S if you click it then it rewrites the URL and the correct page is displayed.

This contribution doesn't rewrite any url's. That is handled by the url rewriter contribution you have installed.

 

Jack

Share this post


Link to post
Share on other sites
None of the files get loaded into admin. The contribution has the files to be uploaded in a directory named catalog. That is a general location standing for the root of your shop. You may not have a catalog directory. If files were to be uploaded into admin, there would be an admin directory in the catalog directory. This is the case with most, if not all, contributions.

 

Jack

 

So if I remove all the files I have uploaded and then upload them again which folder do they need to be uploaded to? the instructions say upload all files in the catalog folder into the same place. where is that place?

Share this post


Link to post
Share on other sites

The "catalog" refers to the root of your shop. I can't tell you exactly since it will vary with your setup. But, generally speaking, it is the directory that holds your admin directory. If you can't figure it out, contact your host and ask them to explain where the web root of your account is.

 

Jack

Share this post


Link to post
Share on other sites
The "catalog" refers to the root of your shop. I can't tell you exactly since it will vary with your setup. But, generally speaking, it is the directory that holds your admin directory. If you can't figure it out, contact your host and ask them to explain where the web root of your account is.

 

Jack

 

Ok excellent thanks for your help, I haven't got to grips with all the terminology yet still picking it up thanks again for your help.

 

Hopefully it all goes according to plan and I can get submitting some Sitemaps.

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

×