Jump to content
Jack_mcs

Google XML Sitemap SEO

Recommended Posts

Did not get this error when installing. I realized I was not getting my cron email because I had my cron set up wrong by accident (lack of sleep). So I pointed by browser to the /googlesitemap/index.php file manually that the cron points too. Here is what I got. Top of the page says error. Maybe its nothing Im not sure just wanted to find out.

It looks like your products site map is not being created for some reason. Be sure the sitemapproducts.xml file exists on the server and that it has the correct permissions settings. Also check to make sure that the other files are being updated, just to be sure there isn't some other problem.

 

Jack

Share this post


Link to post
Share on other sites

Everything else is updating fine except for the products. Permissions were wrong but even after I fixed the permissions it still returns the error on /googlesitemap/index.php and products do not update. It did however function correctly and update upon installation.

Share this post


Link to post
Share on other sites

Hmm, that's a strange one and I can't think of anything that would cause it. But if it did work at one point, then something must have changed to cause it to fail so all I can suggest is that you review whatever changes were made since it was initially installed.

 

Jack

Share this post


Link to post
Share on other sites

Uploading a fresh products xml file do any good? Could an error be returned like that because of that file or the is it the index file itself?

Share this post


Link to post
Share on other sites

Well nothing I have tried works. I tried fresh files. Tried using the alternate class though I knew that was not what was going on but I tried it anyway.

 

The only thing I think I've added since this mod is Header Tags, Links Manager II, and Store Open/Closed/Maintenance. I don't see how adding new stuff would effect Google sitemap anyway though cause it does not edit any files.

Share this post


Link to post
Share on other sites
Well nothing I have tried works. I tried fresh files. Tried using the alternate class though I knew that was not what was going on but I tried it anyway.

 

The only thing I think I've added since this mod is Header Tags, Links Manager II, and Store Open/Closed/Maintenance. I don't see how adding new stuff would effect Google sitemap anyway though cause it does not edit any files.

 

Any other avenues you can think of I should approach?

Share this post


Link to post
Share on other sites

Jack,

 

i just noticed that there is a sitemap on my website after so many weeks. haha..... well, here it is (located under the information box labeled as "BOX_INFORMATION_SITEMAP_SEO") here's a screenshot.

3369504852_351be93148_o.jpg

 

 

 

but then when u click on it, this is what it shows (with errors) :

3368679455_30df4d12bb_o.jpg

Share this post


Link to post
Share on other sites

That's a different contribution. Please ask in the appropriate support thread.

 

Jack

Share this post


Link to post
Share on other sites

i check /includes/functions/sitemap.php as per the error, this is what i get

 

line 25 : if (GetFilesArray($path, &$lines))

line 132 : if (GetFilesArray($path, &$lines))

 

may i know whats wrong with this 2 lines?

Edited by uniquexme

Share this post


Link to post
Share on other sites
Jack, may i ask where shd i get help on this pls?

The support thread is listed on the contribution page as well as in the documentation.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack, installed the contrib all appears fine except the following error on submission, ! Line Status Details

3 URL not allowed

This url is not allowed for a Sitemap at this location. Help URL:

Problem detected on: http://www.doorsteppetfood.co.ukDIR_WS...C...-15kg-p-47.html

Mar 20, 2009

9 URL not allowed

This url is not allowed for a Sitemap at this location. Help URL:

Problem detected on: http://www.doorsteppetfood.co.ukDIR_WS_HTT...gear-p-198.html

Mar 20, 2009

Line Status Details

Can you point me where to look to correct,

 

Thanks again

Share this post


Link to post
Share on other sites

I currently have the "Ultimate Seo Urls v2.6 (18 Aug 2008) + bug fix Full package" installed... should I downgrade the version I have to your 2.1d so that Google like my sitemaps?

 

And if so should I just follow the upgrade process for 2.1x as documented in install file?

 

Andy

 

 

 

It is probably due to your version of Ultimate SEO. Try installing the 2.1d version I uploaded.

 

Jack

Share this post


Link to post
Share on other sites
Hi Jack, installed the contrib all appears fine except the following error on submission, ! Line Status Details

3 URL not allowed

This url is not allowed for a Sitemap at this location. Help URL:

http://www.doorsteppetfood.co.ukDIR_WS...C...-15kg-p-47.html[/url]

http://www.doorsteppetfood.co.ukDIR_WS_HTT...gear-p-198.html[/url]

The capital letters in the link, DIE_WS..., indicate an improperly setup configure file. You should post your confiugre file, without the login data, in a new thread in the general forum (it will be ignored here), state the problem and someone should help with it.

 

Jack

Share this post


Link to post
Share on other sites
I currently have the "Ultimate Seo Urls v2.6 (18 Aug 2008) + bug fix Full package" installed... should I downgrade the version I have to your 2.1d so that Google like my sitemaps?

 

And if so should I just follow the upgrade process for 2.1x as documented in install file?

 

Andy

If the links in your sitemap are not correct, then, yes, you should. It is a simple change of one file so it is an easy test to see if it makes a difference.

 

Jack

Share this post


Link to post
Share on other sites

Google is reporting priority errors to all urls

 

All the URLs in your Sitemap have the same priority.

All the URLs in your Sitemap are set to the same priority (not the default priority). Priority indicates the importance of a particular URL relative to other URLs on your site, and doesn't impact your site's performance in search results. If all URLs have the same priority, Google can't tell which are more important.

can someone advise if there is a default priority that should set somewhere

(not the default priority)

New osCommerce Learner

Old & Slow

Share this post


Link to post
Share on other sites

What sitemap are they referring to? Have you looked in the sitemap file to see if they are all the same? If it is the products sitemap and they are all the same, then it is probably because they products were all modified at the same time. Try modiying a few of them and re-running the script.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack

Yes products sitemap all modified on the same day

all same<priority>0.1</priority>

will Re:run script

Thanks


New osCommerce Learner

Old & Slow

Share this post


Link to post
Share on other sites

Hello Everyone and Jack,

 

Our webiste is little different then most, and we would like to change the priority setting to use "Products Viewed" (like the products viewed report value) rather then "Products Ordered". Although I can code a little, I am not that great at it. Would someone help with this please? I don't want mess up the function GenerateProductsSitemap. I know this is where the change needs to take place, just could really use some help.

 

Thank you,

Jon

Share this post


Link to post
Share on other sites
Hello Everyone and Jack,

 

Our webiste is little different then most, and we would like to change the priority setting to use "Products Viewed" (like the products viewed report value) rather then "Products Ordered". Although I can code a little, I am not that great at it. Would someone help with this please? I don't want mess up the function GenerateProductsSitemap. I know this is where the change needs to take place, just could really use some help.

 

Thank you,

Jon

In the sitemap_class.php file, change this code

		$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_ordered DESC";

to this

		$sql = "SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered, pd.products_viewed as viewed
			FROM " . TABLE_PRODUCTS . " p left join " .
			   TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id = pd.products_id  
			WHERE products_status='1' 
			ORDER BY products_ordered DESC";

and this line

$lastmod = $this->NotNull($result['last_mod']) ? $result['last_mod'] : $result['date_added'];

to this

$lastmod = $this->NotNull($result['viewed']) ? $result['viewed'] : $result['date_added'];

 

I haven't tested the above but it should be close to what you need.

 

Jack

Share this post


Link to post
Share on other sites

Hello Jack,

 

Thank you for your help. I made a couple of other changes because I am getting an error. Would you take a look at the function below and see if you can see what is wrong please?

 

Thanks Again!

Jon

 

	function GenerateProductSitemap(){
       $sql = "SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered, pd.products_viewed as viewed
       FROM " . TABLE_PRODUCTS . " p left join " .
       TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id = pd.products_id  
       WHERE p.products_status='1' 
       ORDER BY p.products_viewed DESC";
	if ( $products_query = $this->DB->Query($sql) ){
		$this->debug['QUERY']['PRODUCTS']['STATUS'] = 'success';
		$this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = $this->DB->NumRows($products_query);
		$container = array();
		$number = 0;
		$top = 0;
		while( $result = $this->DB->FetchArray($products_query) ){
			$top = max($top, $result['viewed']);
			$location = $this->hrefLink(FILENAME_PRODUCT_INFO, 'p.products_id=' . $result['pID'], 'NONSSL', false);
			$lastmod = $this->NotNull($result['viewed']) ? $result['viewed'] : $result['date_added'];
			$changefreq = GOOGLE_SITEMAP_PROD_CHANGE_FREQ;
			$ratio = $top > 0 ? $result['viewed']/$top : 0;
			$priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', ''); 

			$container[] = array('loc' => htmlspecialchars(utf8_encode($location)),
			                     'lastmod' => date ("Y-m-d", strtotime($lastmod)),
								 'changefreq' => $changefreq,
								 'priority' => $priority
			                     );
			if ( sizeof($container) >= 50000 ){
				$type = $number == 0 ? 'products' : 'products' . $number;
				$this->GenerateSitemap($container, $type);
				$container = array();
				$number++;
			}
		} # end while
		$this->DB->Free($products_query);			
		if ( sizeof($container) > 1 ) {
			$type = $number == 0 ? 'products' : 'products' . $number;
			return $this->GenerateSitemap($container, $type);
		} # end if			
	} else {
		$this->debug['QUERY']['PRODUCTS']['STATUS'] = 'false';
		$this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = '0';
	}
} # end function

Edited by projman

Share this post


Link to post
Share on other sites

Jack,

 

Here is the error I am getting. Sorry I forgot to list it with the last reply:

 

ERROR: Google Product Sitemap Generation FAILED!

Write /sitemapcategories.xmlGenerated Google Category Sitemap Successfully

Write /sitemapspecials.xmlGenerated Google Specials Sitemap Successfully

Write /sitemapindex.xmlGenerated Google Sitemap Index Successfully

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => false

[NUM_ROWS] => 0

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 64

)

 

[sPECIALS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 24

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /sitemapcategories.xml

[status] => success

[file_exists] => true

)

 

[1] => Array

(

[file] => /sitemapspecials.xml

[status] => success

[file_exists] => true

)

 

[2] => Array

(

[file] => /sitemapindex.xml

[status] => success

[file_exists] => true

)

)

)

Edited by projman

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

×