Jump to content
Chemo

[CONTRIBUTION] Google XML Sitemap Feed - by Chemo

Recommended Posts

I have the same error. Can anyone help?

 

Thanks

 

Jason, head to the link Jack post above, follow the amendments are per attached. mine is fixed

Share this post


Link to post
Share on other sites

Hello,

 

I have installed this contribution on a few sites, but on a couple I am getting this error,

 

ERROR: Google Specials Sitemap Generation FAILED!

 

Array
(
[QUERY] => Array
	(
		[PRODUCTS] => Array
			(
				[STATUS] => success
				[NUM_ROWS] => 4926
			)

		[CATEOGRY] => Array
			(
				[STATUS] => success
				[NUM_ROWS] => 185
			)

		[MANUFACTURERS] => Array
			(
				[STATUS] => success
				[NUM_ROWS] => 44
			)

		[SPECIALS] => Array
			(
				[STATUS] => success
				[NUM_ROWS] => 1
			)

	)

[SAVE_FILE_XML] => Array
	(
		[0] => Array
			(
				[file] => /home/virtual/domain.com/var/www/html/sitemapproducts.xml
				[status] => success
				[file_exists] => true
			)

		[1] => Array
			(
				[file] => /home/virtual/domain.com/var/www/html/sitemapcategories.xml
				[status] => success
				[file_exists] => true
			)

		[2] => Array
			(
				[file] => /home/virtual/domain.com/var/www/html/sitemapmanufacturers.xml
				[status] => success
				[file_exists] => true
			)

		[3] => Array
			(
				[file] => /home/virtual/domain.com/var/www/html/sitemapindex.xml
				[status] => success
				[file_exists] => true
			)

	)

)

 

Thank you JR

Share this post


Link to post
Share on other sites

Hello,

 

If you get a error for either manufacturers or specials, try adding a second manufacturer (even if not used) and or second special it should solve the error. Some reason the contributions has to have more than one in the database.

 

JR

Share this post


Link to post
Share on other sites

Hi,

Thank you for the contribution. I installed the files and folder in my catalog directory which is the root in my case, set the permission to 777 ran the googlesitemap/index.php and receive this message CONGRATULATIONS! All files generated successfully.

However when trying to watch in the browser one of the site maps for example: http//www.mydomain.com/sitemapmanufacturers.xml

I receive the following error: Error loading stylesheet: A network error occured loading an XSLT stylesheet

Can you help me resolve it?

 

Thank you

Share this post


Link to post
Share on other sites

I'm having an issue that I haven't been able to solve by reading through any of the forums.

 

Google has accepted both my:

sitemapcategories.xml and my

sitemapindex.xml

 

but there are errors with my sitemapproducts.xml

 

The error says:

 

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

 

 

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

 

A semi colon character was expected. Error processing resource 'http://www.bella-blanca.com/sitemapproducts.xml'. Line 130...

 

<loc>http://bella-blanca.com/product_info.php?cPath=63&products_id=192</loc>

----------------------------...

 

 

Here is what the file looks like... am I simply missing a semi colon?

 

Thanks in advance

 

 

 

CODE

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

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

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=194</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>1.0</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=179</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=188</loc>

<lastmod>2008-06-23</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=190</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=196</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=201</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=203</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=204</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=206</loc>

<lastmod>2008-09-10</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=195</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=178</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=191</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=193</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=183</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=182</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=186</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=180</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=192</loc>

<lastmod>2008-06-23</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=200</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

<url>

<loc>http://bella-blanca.com/product_info.php?products_id=176</loc>

<lastmod>2008-06-24</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

</urlset>

Share this post


Link to post
Share on other sites

After installing google XML sitemap, I entered in the browser http://brs-giftshop.com/googlesitemap/index.php stating sitemaps created successfully. Now going to http://brs-giftshop.com/sitemapproducts.xml , it states zero url in sitemap.

 

And on google site status for all three is OK:

googleSitemapCategories.php

googleSitemapProducts.php

sitemap.xml

 

Even corn job was set up. But when I received the email, it stated this:

 

/bin/sh: /xxxxxxx/xxxxxxxxxxx/public_html/googlesitemap/index.php: Permission denied

 

I did contact the server host and checked the permission. all is fine.

 

Besides sitemaps stating zero url's do I actuaaly need to have php before the address when setting up the corn job?

Share this post


Link to post
Share on other sites
After installing google XML sitemap, I entered in the browser http://brs-giftshop.com/googlesitemap/index.php stating sitemaps created successfully. Now going to http://brs-giftshop.com/sitemapproducts.xml , it states zero url in sitemap.

 

And on google site status for all three is OK:

googleSitemapCategories.php

googleSitemapProducts.php

sitemap.xml

 

Even corn job was set up. But when I received the email, it stated this:

 

/bin/sh: /xxxxxxx/xxxxxxxxxxx/public_html/googlesitemap/index.php: Permission denied

 

I did contact the server host and checked the permission. all is fine.

 

Besides sitemaps stating zero url's do I actuaaly need to have php before the address when setting up the corn job?

 

 

Receiving emails now without any errors. I forgot to add php before the path in corn jobs connand line. But still going to above urls, it still states zero URL's.

Share this post


Link to post
Share on other sites

I Just installed the contrib and tried to call the /googlesitemap/index.php from my browser but get nothing but a blank page. It is installed in my root directory if that makes a difference. Can anybody help with this?

Share this post


Link to post
Share on other sites

Still am zero urls when I enter http://brs-giftshop.com/sitemapcategories.xml as while as the other xml files. I sent a copy of the email I receive at midnight every day, they tell me there is an error in in the code googlesitemap/index.php.

 

You can view the results by going here!

 

But going to google webmasters tool, there is no errors, it reports all url's. So by going to the above links, should I see the category list?

Edited by blr044

Share this post


Link to post
Share on other sites

Still am wondering if this is correct. When I type http://brs-giftshop.com/sitemapproducts.xml into browser, it still states zero urls in sitemap.

 

The email I receive every noght contains this info:

 

Write /xxxx/xxxxxxxx/xxxxxxxxx/sitemapproducts.xmlGenerated Google Product Sitemap Successfully

 

Write /xxxx/xxxxxxxx/xxxxxxxxx/sitemapcategories.xmlGenerated Google Category Sitemap Successfully

 

Google Sitemap Manufacturers not generated - no Manufacturers found!

 

Write /xxx/xxxxxxx/xxxxxxx/sitemapspecials.xmlGenerated Google Specials Sitemap Successfully

 

Write /xxxx/xxxxx/xxxxxxxx/sitemapindex.xmlGenerated 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 /xxxxx/xxxxxxx/xxxxxxx/googlesitemap/index.php

 

Here is your sitemap index: http://brs-giftshop.com/sitemapindex.xml

Here is your product sitemap: http://brs-giftshop.com/sitemapproducts.xml

Here is your category sitemap: http://brs-giftshop.com/sitemapcategories.xml

Here is your specials sitemap: http://brs-giftshop.com/sitemapspecials.xml

 

Is this what the email should look like?

 

And going to /sitemapproducts.xml, what should see on this page?

 

My host feels there is an error in the code for /googlesitemap/index.php!

 

Would appreciate hearing from members on these questions. Thanks.

Share this post


Link to post
Share on other sites

The output may be correct, though the maps are not being created. I suggest you read through the support thread for the contribution you are using, which isn't this one. If you can't find the answer, try posting your questions there.

 

Jack

Share this post


Link to post
Share on other sites
The output may be correct, though the maps are not being created. I suggest you read through the support thread for the contribution you are using, which isn't this one. If you can't find the answer, try posting your questions there.

 

Jack

 

 

Sorry to have wasted anyones time, thought I was at the correct thread.

Share this post


Link to post
Share on other sites

It's not a matter of wasting anyones time. This thread doesn't have anyone supporting it so you can ask and ask and may never get a reply. I just happened to notice it and took a look.

 

Jack

Share this post


Link to post
Share on other sites

I am totally stumped, I know... what else is new. :blush:

 

I had to use the sitemap.class_Alternative.php in order to get things working.

 

I thought the sitemap generation was working correctly, until I finally received an email from the Cron Job. :huh:

 

http://handeshobbies.com/googlesitemap/index.php says all is a success.

 

But I receive a FAILED in the Cron Job email:

 

X-Powered-By: PHP/5.2.9
Content-type: text/html

<pre>

<b>Warning</b>:  fopen(/sitemapproducts.xml) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in <b>/home3/handesho/public_html/googlesitemap/sitemap.class.php</b> on line <b>300</b>

ERROR: Google Product Sitemap Generation FAILED!



<b>Warning</b>:  fopen(/sitemapcategories.xml) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in <b>/home3/handesho/public_html/googlesitemap/sitemap.class.php</b> on line <b>300</b>

ERROR: Google Category Sitemap Generation FAILED!



<b>Warning</b>:  fopen(/sitemapmanufacturers.xml) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in <b>/home3/handesho/public_html/googlesitemap/sitemap.class.php</b> on line <b>300</b>

ERROR: Google Manufacturers Sitemap Generation FAILED!

Google Sitemap Specials not generated - no specials found!



<b>Warning</b>:  fopen(/sitemapindex.xml) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in <b>/home3/handesho/public_html/googlesitemap/sitemap.class.php</b> on line <b>300</b>

ERROR: Google Sitemap Index Generation FAILED!

Array
(
[QUERY] => Array
	(
		[PRODUCTS] => Array
			(
				[STATUS] => success
				[NUM_ROWS] => 427
			)

		[CATEOGRY] => Array
			(
				[STATUS] => success
				[NUM_ROWS] => 37
			)

		[MANUFACTURERS] => Array
			(
				[STATUS] => success
				[NUM_ROWS] => 11
			)

		[SPECIALS] => Array
			(
				[STATUS] => success
				[NUM_ROWS] => 0
			)

	)

[SAVE_FILE_XML] => Array
	(
		[0] => Array
			(
				[file] => /sitemapproducts.xml
				[status] => failure
				[file_exists] => false
			)

		[1] => Array
			(
				[file] => /sitemapcategories.xml
				[status] => failure
				[file_exists] => false
			)

		[2] => Array
			(
				[file] => /sitemapmanufacturers.xml
				[status] => failure
				[file_exists] => false
			)

		[3] => Array
			(
				[file] => /sitemapindex.xml
				[status] => failure
				[file_exists] => false
			)

	)

)
</pre>

 

sitemap.class.php line 300 = if ($fp = fopen($filename, 'w+')){

I'm sorry if this has been covered already, I could not find it. :(

 

P.S. All files have 755 permission, same as my images directory.

Edited by jhande

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Share this post


Link to post
Share on other sites

OOP's :blush:

 

Wrong thread!

 

Kind of the same contribution, 2 support threads. :o


- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Share this post


Link to post
Share on other sites

Hi all,

 

great contrib, thanks.

 

Just some questions here.

 

When the 5 xml files are generated, should I send them all to google? I send them all through webmaster tools.

 

Also for 2 of them:

 

sitemapindex.xml

sitemapspecials.xml

 

I got warnings: something repated to URLs priority being the same in these 2 indeces. How can I solve this problem?

 

My site has two language versions, english and bulgarian. In the sitemapspecials.xml I can see 2 links to one same product. Which is OK since I have only one product in the special category. So I asume the 2 same links are for the 2 languages. I the sitemapproducts.xml though I have only 5 links to products, having only 5 products in the store now. Shouldnt they be 10, 5 time 2 for every language?

 

Thanks a lot.


OSC beginner

Share this post


Link to post
Share on other sites

HI

I was running sitemap update as CRON and it was going fine. I used to see the same message as if you run it manually in the CRON emails.

Some days ago I started getting this in the emails and the sitemaps arent updated.

 

Status: 302 Moved Temporarily

X-Powered-By: PHP/5.2.9

Location: http://www.kupuvalnik.com/blocked.php

Content-type: text/html

 

 

Any ideas


OSC beginner

Share this post


Link to post
Share on other sites

Hi to Everyone!

 

I have upload the next files in my web:

 

googleSitemapProducts.php

googleSitemapCategories.php

googleSitemapManufacturers.php

googleSitemapReviews.php

 

 

When i check them at google webmaster tools, it gives me this error:

 

Leading whitespace

We have detected that your Sitemap begins with whitespace. We have accepted the file, but should eliminate the blank space to meet the XML standard.

 

And when I open the file from the browser it shows me:

 

Error reading XML: XML or text declaration in a separate entity from the principle of

Location: http://www.domainname.com/googleSitemapProducts.php

Number of line 2, column 1:

 

I dont have idea from where come this whitespace.

 

Does anyone know how can i fix it?

 

Thanks for your time

Share this post


Link to post
Share on other sites

Hi...I uploaded googlesitemap generator by bobby about a year ago. It only has two files...googlesitemapcategories.php & googlesitemapproducts.php. Then I go to google.com/webmasters/sitemaps and put my website in. However, the googlesitecategories.php is fine but googlesitemapproducts.php is not. Google is giving me this error: 1193 Invalid date

An invalid date was found. Please fix the date or formatting before resubmitting. How do I do that?

 

Also, shouldn't I be submitting an index page to google? Like mysite.com/catalog instead of mysite.com? Thanks for help and time, Sincerely, Janet

 

I am not sure what to do. my server date and time is this: 10/18/2009 22:04:17

 

Here is my googlesitemapproducts.php page:

<?php
/**
 * Google Sitemap Generator
 * 
 * Script to generate a Google sitemap for osCommerce based stores
 *
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version 1.2
 * @link http://www.oscommerce-freelancers.com/ osCommerce-Freelancers
 * @copyright Copyright 2006, Bobby Easland 
 * @author Bobby Easland 
 * @filesource
 */

/*
 * Include the application_top.php script
 */
include_once('includes/application_top.php');

/*
 * Send the XML content header
 */
header('Content-Type: text/xml');

/*
 * Echo the XML out tag
 */
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php

/*
 * Define the uniform node function 
 */
function GenerateNode($data){
	$content = '';
	$content .= "\t" . '<url>' . "\n";
	$content .= "\t\t" . '<loc>'.trim($data['loc']).'</loc>' . "\n";
	$content .= "\t\t" . '<lastmod>'.trim($data['lastmod']).'</lastmod>' . "\n";
	$content .= "\t\t" . '<changefreq>'.trim($data['changefreq']).'</changefreq>' . "\n";
	$content .= "\t\t" . '<priority>'.trim($data['priority']).'</priority>' . "\n";
	$content .= "\t" . '</url>' . "\n";
	return $content;
} # end function

/*
 * Define the SQL for the products query 
 */
$sql = "SELECT products_id as pID, 
							 products_date_added as date_added, 
							 products_last_modified as last_mod, 
							 products_ordered  
				FROM " . TABLE_PRODUCTS . " 
				WHERE products_status = '1' 
				ORDER BY products_last_modified DESC, 
				         products_date_added DESC, 
								 products_ordered DESC";

/*
 * Execute the query
 */
$query = tep_db_query($sql);

/*
 * If there are returned rows...
 * Basic sanity check 
 */
if ( tep_db_num_rows($query) > 0 ){

	/*
	 * Initialize the variable containers
	 */
	$container = array();
	$number = 0;
	$top = 0;

	/*
	 * Loop the query result set
	 */
	while( $result = tep_db_fetch_array($query) ){
		$top = max($top, $result['products_ordered']);
		$location = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $result['pID'], 'NONSSL', false);
		if ( tep_not_null($result['last_mod']) ){
			$lastmod = $result['last_mod'];
		} else {
			$lastmod = $result['date_added'];
		}
		$changefreq = 'weekly';
		$ratio = ($top > 0) ? ($result['products_ordered']/$top) : 0;
		$priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', ''); 

		/*
		 * Initialize the content container array
		 */
		$container = array('loc' => htmlspecialchars(utf8_encode($location)),
							 				 'lastmod' => date ("Y-m-d", strtotime($lastmod)),
							 				 'changefreq' => $changefreq,
							 				 'priority' => $priority
											);

		/*
		 * Echo the generated node
		 */
		echo generateNode($container);
	} # end while
} # end if

/*
 * Close the urlset
 */
echo '</urlset>';

/*
 * Include the application_bottom.php script 
 */
include_once('includes/application_bottom.php');
?>

Share this post


Link to post
Share on other sites

hy

 

i install the this program

 

i set the perm. for the file but

 

this error had appeared

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request

 

what can i do Chemo?

 

thanks

Share this post


Link to post
Share on other sites

Hi Chemo,

 

I installed version 1.3 and everything works except for the product xml output. I have set the permissions correctly.

 

i get this error when i tested everything in the browser.

 

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

 

ERROR: Google Product Sitemap Generation FAILED!

 

Generated Google Category Sitemap Successfully

 

Generated Google Sitemap Index Successfully

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 1

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 10

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /home/oldfoun1/public_html/catalog/sitemapcategories.xml

[status] => success

[file_exists] => true

)

 

[1] => Array

(

[file] => /home/oldfoun1/public_html/catalog/sitemapindex.xml

[status] => success

[file_exists] => true

)

 

)

 

)

 

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

 

Any ideas? Thanks for a wonderful contribution.

 

Jason

Edited by rustyclockwork

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

×