Jump to content
Jack_mcs

Google XML Sitemap SEO

Recommended Posts

Yes, the search engines have agreed to this standard. Google provides tracking information based upon and Bing will too if you create the account there.

 

Jack

Share this post


Link to post
Share on other sites

First of all, Jack, I like to thank you for all of support. You have created some great mods. I have this contribution installed and all is working great.

 

Was at Bing.com to get site listed and indexed. They require a file in root called sitemap.xml. your contribution created the following files in root and do not have such file:

 

sitemapcategories.xml

sitemapspecials.xml

sitemapindex.xml

sitemapmanufacturers.xml

sitemappages.xml

sitemapproducts.xml

 

So am asking if i created a sitemap.xml for bing, will this run in conflict with your mod. Looking through their forum for an answer, but nothing yet.

 

Thanks.

 

Bennett

Share this post


Link to post
Share on other sites

Bnig has an option where you can tell them what sitemap file to use. Set it to the sitemapindex.xml file and it should be OK.

 

Jake

Share this post


Link to post
Share on other sites
Bnig has an option where you can tell them what sitemap file to use. Set it to the sitemapindex.xml file and it should be OK.

 

Jake

 

 

Thanks. After submitting sitemapindex.xml, site is now indexed and no problems were found.

 

Bennett

Share this post


Link to post
Share on other sites

Hi Jack

As suggested I have changed from Chemo's Google sitemap to your latest version. (and posted in right thread this time!)

I have read all 18 pages & cannot find any which look like mine? :(

I tried standard then alternative & also diagnostic.

All sitemaps are filled except for the sitemapindex which is empty?

I notice the thread says sitemap_class.php but the uploaded files within the directory says sitemap.class.php?

Here is the diagnostic with the standard setting

 

Opening   /xxx/xxxx/public_html/sitemapproducts.xml
FS_CAT	/xxx/xxxx/public_html/
Server	http://www.xxxxx.co.uk
Save Path /xxx/xxxx/public_html/
WS_CAT	/ 
Write /xxx/xxxx/public_html/sitemapproducts.xml
Generated Google Product Sitemap Successfully

Opening   /xxx/xxxx/public_html/sitemapcategories.xml
FS_CAT	/xxx/xxxx/public_html/
Server	http://www.xxxxx.co.uk
Save Path /xxx/xxxx/public_html/
WS_CAT	/ 
Write /xxx/xxxx/public_html/sitemapcategories.xml
Generated Google Category Sitemap Successfully

Opening   /xxx/xxxx/public_html/sitemapmanufacturers.xml
FS_CAT	/xxx/xxxx/public_html/
Server	http://www.xxxxx.co.uk
Save Path /xxx/xxxx/public_html/
WS_CAT	/ 
Write /xxx/xxxx/public_html/sitemapmanufacturers.xml
Generated Google Manufacturers Sitemap Successfully

Opening   /xxx/xxxx/public_html/sitemapspecials.xml
FS_CAT	/xxx/xxxx/public_html/
Server	http://www.xxxxx.co.uk
Save Path /xxx/xxxx/public_html/
WS_CAT	/ 
Write /xxx/xxxx/public_html/sitemapspecials.xml
Generated Google Specials Sitemap Successfully


Warning:  chdir() [function.chdir]: open_basedir restriction in effect. File(/xxx/xxxx/public_html) is not within the allowed path(s): (/xxx/xxxx/public_html/) in /xxx/xxxx/public_html/googlesitemap/sitemap.class.php on line 840

Opening   /xxx/xxxx/public_html/sitemappages.xml
FS_CAT	/xxx/xxxx/public_html/
Server	http://www.xxxxx.co.uk
Save Path /xxx/xxxx/public_html/
WS_CAT	/ 
Write /xxx/xxxx/public_html/sitemappages.xml
Generated Google Pages Sitemap Successfully


Warning:  glob() [function.glob]: open_basedir restriction in effect. File(/xxx/xxxx/public_html) is not within the allowed path(s): (/xxx/xxxx/public_html/) in /xxx/xxxx/public_html/googlesitemap/sitemap.class.php on line 429


Warning:  Invalid argument supplied for foreach() in /xxx/xxxx/public_html/googlesitemap/sitemap.class.php on line 429

Opening   /xxx/xxxx/public_html/sitemapindex.xml
FS_CAT	/xxx/xxxx/public_html/
Server	http://www.xxxxx.co.uk
Save Path /xxx/xxxx/public_html/
WS_CAT	/ 
Write /xxx/xxxx/public_html/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/ping?sitemap=http%3A%2F%2Fwww.xxxxx.co.uk%2Fsitemapindex.xml

For your convenience here is the CRON command for your site:
php /xxx/xxxx/public_html/googlesitemap/index.php

Here is your sitemap index: http://www.xxxxx.co.uk/sitemapindex.xml
Here is your product sitemap: http://www.xxxxx.co.uk/sitemapproducts.xml
Here is your category sitemap: http://www.xxxxx.co.uk/sitemapcategories.xml
Here is your manufacturers sitemap: http://www.xxxxx.co.uk/sitemapmanufacturers.xml
Here is your pages sitemap: http://www.xxxxx.co.uk/sitemappages.xml
Here is your specials sitemap: http://www.xxxxx.co.uk/sitemapspecials.xml

 

I don't get the error/warnings & the sitemapindex.xml blank?

I have also asked host about server settings. files set to match images.

Any suggestions please? Thanks

Share this post


Link to post
Share on other sites
Hi Jack

As suggested I have changed from Chemo's Google sitemap to your latest version. (and posted in right thread this time!)

I have read all 18 pages & cannot find any which look like mine? :(

I tried standard then alternative & also diagnostic.

All sitemaps are filled except for the sitemapindex which is empty?

I notice the thread says sitemap_class.php but the uploaded files within the directory says sitemap.class.php?

Here is the diagnostic with the standard setting

The line that read

Warning: chdir() [function.chdir]: open_basedir restriction
is the problem. It is due to a server setting. You will need to ask your host to change the settings to allow the script to run properly. If they refuse, there are a few ways that you may be able to get around it but they depends on your server settings so hopefully you have a helpful host.

 

Jack

Share this post


Link to post
Share on other sites

Here is a bit of sql that may help folks in the future who do the same bonehead move I did.

 

In my case, I noticed that my sitemaps were not being created after the initial installation went thru.

After looking at the recent postings on the thread I thought I would look to see how the sitemaps were running.

 

When I noticed they werent, and tried a manual build thru the address bar index.php url.

It failed.

 

Checked the file permissions, switched them a tad from the 644 they were set at, to 755

Still failed.

 

I noticed the output was set for using the alternate file.

So I went to admin>config, but there was no Google XML SEO.

hmmm.

 

So I looked to the sql, since that is how the Google XML SEO command is applied.

 

OK, grab the sql, and apply it, right?

One should check to see if values are already applied before running sql statements.

 

Now I had a menu command for Google XML SEO, but 2 of all the options too.

Oooops.

 

Here is the undo sql statements in case you pull this bonehead move too.

DELETE FROM configuration WHERE configuration_title='Sitemap file' AND configuration_key='GOOGLE_XML_SITEMAP_SEO' AND configuration_value='Standard' AND configuration_description='Which file to use for the sitemap creation. Use Standard unless it doesn\'t work correctly.<br>(Standard=on Alternate=off)' AND configuration_group_id='289' AND sort_order='1' AND set_function='tep_cfg_select_option(array(\'Standard\', \'Alternate\'), ';


DELETE FROM configuration WHERE configuration_title='Enable Manufacturers Map' AND configuration_key='GOOGLE_XML_SITEMAP_CREATE_MANU' AND configuration_value='false' AND configuration_description='Set to true if you would like a site map created for your manufactureres.<br>(true=on false=off)' AND configuration_group_id='289' AND sort_order='5' AND set_function='tep_cfg_select_option(array(\'true\', \'false\'), ';


DELETE FROM configuration WHERE configuration_title='Enable Specials Map' AND configuration_key='GOOGLE_XML_SITEMAP_CREATE_SPECIALS' AND configuration_value='false' AND configuration_description='Set to true if you would like a site map created for your specials.<br>(true=on false=off)' AND configuration_group_id='289' AND sort_order='7' AND set_function='tep_cfg_select_option(array(\'true\', \'false\'), ';


DELETE FROM configuration WHERE configuration_title='Enable Standard Pages Map' AND configuration_key='GOOGLE_XML_SITEMAP_CREATE_PAGES' AND configuration_value='false' AND configuration_description='Set to true if you would like a site map created for your standard pages.<br>(true=on false=off)' AND configuration_group_id='289' AND sort_order='10' AND set_function='tep_cfg_select_option(array(\'true\', \'false\'), ';


DELETE FROM configuration WHERE configuration_title='Enable Diagnostic Output' AND configuration_key='GOOGLE_XML_SITEMAP_SHOW_DIAGNOSTIC' AND configuration_value='false' AND configuration_description='Set to true if you would like debug information displayed. This is useful if the site maps are not being created correctly.<br>(true=on false=off)' AND configuration_group_id='289' AND sort_order='15' AND set_function='tep_cfg_select_option(array(\'true\', \'false\'), ';


DELETE FROM configuration WHERE configuration_title='Exclude these pages' AND configuration_key='GOOGLE_XML_SITEMAP_EXCLUDE_PAGES' AND configuration_description='Add these pages to the built-in file exclude list. This will prevent the links from being added to the pages site map.' AND configuration_group_id='289' AND sort_order='20';

 

Jack, feel free to add this to your package, I have noticed you have been putting similar in your other contribs.

 

 

Corey

Share this post


Link to post
Share on other sites

The Google XML Sitemap SEO menu selection from the configuration menu has vanished (along with header tags SEO)

This is exactly what started the above problem that necessitated the previous post.

 

Anyone else experience this?

 

I really do not want to have to keep applying the menu part of the sql for these contribs just to be able to see the selection.

Share this post


Link to post
Share on other sites

You probably have an older version of Ultimate SEO installed which had that problem. If you install my latest version, 2.12d_3, it will fix that.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack,

 

At your add-ons page, I found there are several contributions for Sitemap.

 

Dynamic SiteMap V1.0

Google XML Sitemap SEO

 

 

I am wondering what's difference between them, Can I install all to my store?

 

 

 

Thanks!

 

Dansino

Share this post


Link to post
Share on other sites
Hi Jack,

 

At your add-ons page, I found there are several contributions for Sitemap.

 

Dynamic SiteMap V1.0

Google XML Sitemap SEO

 

I am wondering what's difference between them, Can I install all to my store?

Dynamic Sitemap adds an actual site map to your shop. It is meant for both the search engines and your visitors. The google sitemap builds files that are only for the search engines. Your visitors will not see them. Both of these can, and should, be installed in a shop. However, I don't recommend using Dynamic Sitemap. It has been replaced with Sitemap SEO.

 

Jack

Share this post


Link to post
Share on other sites
Dynamic Sitemap adds an actual site map to your shop. It is meant for both the search engines and your visitors. The google sitemap builds files that are only for the search engines. Your visitors will not see them. Both of these can, and should, be installed in a shop. However, I don't recommend using Dynamic Sitemap. It has been replaced with Sitemap SEO.

 

Jack

 

Thanks for fast support, Jack,

 

I will install Sitemap SEO from you, http://addons.oscommerce.com/info/6459

 

then I will install google sitemap too.

 

Thanks again!

 

Dansino

Share this post


Link to post
Share on other sites

Hi jack,

 

I use the

 

I have a problem after installing the sitemap SEO, go to admin, here are the errors:

 

Warning: require(includes/boxes/sitemap_seo.php) [function.require]: failed to open stream: No such file or directory in /home/fli48036/public_html/admin/includes/column_left.php on line 24

 

Warning: require(includes/boxes/sitemap_seo.php) [function.require]: failed to open stream: No such file or directory in /home/fli48036/public_html/admin/includes/column_left.php on line 24

 

Fatal error: require() [function.require]: Failed opening required 'includes/boxes/sitemap_seo.php' (include_path='.:/usr/local/lib/php/PEAR:/usr/lib/php:/usr/local/lib/php') in /home/fli48036/public_html/admin/includes/column_left.php on line 24

 

 

I have been to includes/boxes, there is no sitemap_seo.php.

 

- catalog_Only_New_Files - these are files specific to this contribution.

They can all be safely uploaded to your site.

 

Just upload Sitemap_seo.Php? from catalog_Only_New_Files Catalog.

 

 

thanks!

 

Dansino

Edited by dansino

Share this post


Link to post
Share on other sites

It sounds like you missed some of the installation steps. But this thread is for the google sitemap contribution so please ask your questions in the support thread for that contribution.

 

Jack

Share this post


Link to post
Share on other sites
It sounds like you missed some of the installation steps. But this thread is for the google sitemap contribution so please ask your questions in the support thread for that contribution.

 

Jack

 

I had resolved the problem.

 

Thanks Jack.

 

Dansino

Share this post


Link to post
Share on other sites

Hi all and thanks for the work done on this contrib.

 

A couple of things with my installation seem off.

 

Firstly, a bug fix I believe for sitemap.class.php

 

In a couple fo places the code reads:

 

		$content = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
	$content = '<?xml-stylesheet type="text/xsl" href="gss.xsl"?>' . "\n"; //human readable

 

Surely tit should read:

 

		$content = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
	$content .= '<?xml-stylesheet type="text/xsl" href="gss.xsl"?>' . "\n"; //human readable

 

Otherwise the first line will be overwritten in the string.

 

----------

 

Now for a problem I am getting.

 

All xml files are being generated, but my sitemapindex.xml file is not being written correctly as it only contains the following:

 

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="gss.xsl"?>
<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">
</sitemapindex>

 

Any help would be appreciated

Share this post


Link to post
Share on other sites

Thanks for the bug fix but that change should probably only be made to the generatesitemap function. Adding it to both will probably create an error on some servers.

 

I can't think of a reason why your sitemapindex file isn't being generated. The code just cycles through and adds the other sitemaps. I seem to recall someone having this problem though so you may want to read back through this thread. Also, try running the diagnostic.

 

Jack

Share this post


Link to post
Share on other sites

OK, I think I figured out what is wrong.

 

Currently, If none of the extra sitemaps are set to true in the configuration (Manufacturers, Pages, Specials), then sitemapindex.xml is incorrectly written (see post above)

 

However, if any of the three extra sitemaps are set to true, sitemapindex.xml is written correctly.

 

I fixed the above by rewriting the function in sitemap.class.php

 

Here's my revised function:

 

	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
	if (GOOGLE_XML_SITEMAP_CREATE_MANU == 'false'&&GOOGLE_XML_SITEMAP_CREATE_MANU == 'false'&&GOOGLE_XML_SITEMAP_CREATE_PAGES == 'false') {
		$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

 

I'm sure this can be tidied up or rewritten to work better.

 

Or maybe this is only a fix for me on my server and a few others ?

Edited by uksitebuilder

Share this post


Link to post
Share on other sites

re the $content bug

 

this need to be fixed in both generatesitemap() and generatesitemapindex() functions and the latter does not use the generatesitemap() function

Share this post


Link to post
Share on other sites

Hi Jack

 

Still waiting for a reply from host...very unusual. They say I have had some adjustments previously for similar errors?

Google says "Missing XML tag

This required tag is missing. Please add it and resubmit."

Any suggestions, or just keep hastling my host?

 

Thanks

Share this post


Link to post
Share on other sites
Hi all and thanks for the work done on this contrib.

 

A couple of things with my installation seem off.

 

Firstly, a bug fix I believe for sitemap.class.php

 

In a couple fo places the code reads:

 

		$content = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
	$content = '<?xml-stylesheet type="text/xsl" href="gss.xsl"?>' . "\n"; //human readable

 

Surely tit should read:

 

		$content = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
	$content .= '<?xml-stylesheet type="text/xsl" href="gss.xsl"?>' . "\n"; //human readable

 

Otherwise the first line will be overwritten in the string.

 

----------

Thanks

 

Which file do I make this change please, as I'm unsure what it is doing?

 

Jack says just one?

 

Much appreciated.

Share this post


Link to post
Share on other sites

File: sitemap.class.php

 

Two occurrences in:

 

generatesitemap() function and generatesitemapindex() function.

 

After cahnging and running, look at all the generated files to make sure they all have the following at the very top:

 

<?xml version="1.0" encoding="UTF-8"?>

Share this post


Link to post
Share on other sites

I changed the first one as suggested by UKsitebuilder & Jack but nothing changed.

I then changed both. The source now says:

<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href="gss.xsl"?>

<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">

</sitemapindex>

But the http://www.xxxxx.co.uk/sitemapindex.xml is still showing a blank table??

All other sitemaps are filling & showing correctly (I assume) All have info/products etc in & all set to true in admin. Sitemap using standard option. Alternative gives more errors & FAILED

And the warnings as per my other post are still there?

I assume the server settings still need to be done then?

 

Thanks for help & will chase host AGAIN!

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

×