Jump to content
Jack_mcs

Google XML Sitemap SEO

Recommended Posts

Jack, could you please provide the change for the manufacturers sql query in googlesitemap/sitemap.class.php?

This has not been tested but I think it is correct. In googlesitemap/index.php, change

 if ($google->GenerateManufacturerSitemap()){

to

 if ($google->GenerateManufacturerSitemap($languages_id)){

and change

	function GenerateManufacturerSitemap(){
       $sql = "SELECT manufacturers_id as mID, date_added, last_modified as last_mod, manufacturers_name
               FROM " . TABLE_MANUFACTURERS . " order by manufacturers_name DESC";

to

	function GenerateManufacturerSitemap($language_id){
       $sql = "SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name
               FROM " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = " . (int)$language_id . " order by manufacturers_name DESC";

Share this post


Link to post
Share on other sites

Jack, does the code have an option to add to the robots.txt file? Maybe I just missed it. Like...

 

Sitemap: http://www.example.tld/sitemapindex.xml

 

That way the sitemaps would be available to any other bot.

Add the above to the bottom of the robots file.

Share this post


Link to post
Share on other sites

This has not been tested but I think it is correct. In googlesitemap/index.php, change ...

 

It appears that it is failing...

 

ERROR: Google Manufacturers Sitemap Generation FAILED!

 

and:

[MANUFACTURERS] => Array
               (
                   [sTATUS] => success
                   [NUM_ROWS] => 0
               )

 

I have uploaded an empty sitemapmanufacturers.xml file to a server before testing. All other sitemaps created successfully.


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

It appears that it is failing...

 

ERROR: Google Manufacturers Sitemap Generation FAILED!

The

order by manufacturers_name

should be

order by m.manufacturers_name

Share this post


Link to post
Share on other sites

It is still failing I'm afraid... ERROR: Google Manufacturers Sitemap Generation FAILED!

 

this is the code:

	function GenerateManufacturerSitemap($languages_id){
       $sql = "SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name
               FROM " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = " . (int)$language_id . " order by m.manufacturers_name DESC";


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

It is still failing I'm afraid... ERROR: Google Manufacturers Sitemap Generation FAILED!

 

this is the code:

	function GenerateManufacturerSitemap($languages_id){
       $sql = "SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name
               FROM " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = " . (int)$language_id . " order by m.manufacturers_name DESC";

I don't have time to work on it now but you can try running it directly from phpmyadmin to see if the comman will work. Change it to the following, replacing the 1 with the language id you want to use.

SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name FROM manufacturers m left join manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id 1 order by m.manufacturers_name DESC;

If that fails, assuming I didn't make a typo, then there is a problem with your manufacturers table.

Share this post


Link to post
Share on other sites

OK, the following did not work - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 order by m.manufacturers_name DESC LIMIT 0, 30' at line 1

SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name FROM manufacturers m left join manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id 1 order by m.manufacturers_name DESC;

so I changed it to this (where mi.languages_id = 1) and it worked just fine - Showing rows 0 - 3 (4 total, Query took 0.0006 sec)

SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name FROM manufacturers m left join manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = 1 order by m.manufacturers_name DESC;

 

So, what does it tell us?


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

OK, the following did not work - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 order by m.manufacturers_name DESC LIMIT 0, 30' at line 1

 

So, what does it tell us?

Yes, that was a typo in my example. The change you made is correct. But that, with that change, should be the same as what is in the code so I don't know why it is failing. I'm sure it is something simple since that is a minor change to already working code. When I get a chance I will look at it but that could be quite some time.

Share this post


Link to post
Share on other sites

Hi Jack,

Thanks very much for your work on this add on.

 

I have version 1.4.1 installed and it seems to work ok. This (and your latest version 1.5) produces sitemaps tagged as <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">

 

However, Google says that Sitemap Protocol 0.84 is now deprecated (see http://www.google.com/schemas/sitemap/0.84/ ). Google now adheres to Sitemap Protocol 0.9 as defined by sitemaps.org

 

Are there plans to upgrade this add on to protocol 0.9?

 

Also, is it essential I upgrade my version 1.4.1 to 1.5? In other words are there bugs in 1.4.1 render it obsolete?

Cheers

Share this post


Link to post
Share on other sites

hi jack,

 

installed the contribution. it works fine ecept the fat that my /sitemapindex.xml is empty. it shows 0 components in it. i was expecting to see the information from the INFORMATION box?

 

Google Sitemap http://mydomain.co.uk/sitemapindex.xml

Number of sitemaps in this Google sitemap index: 0

Click on the table headers to change sorting.

 

can you tell me what is wrong

 

thanks

valeri

Share this post


Link to post
Share on other sites

installed the contribution. it works fine ecept the fat that my /sitemapindex.xml is empty. it shows 0 components in it. i was expecting to see the information from the INFORMATION box?

 

Google Sitemap http://mydomain.co.uk/sitemapindex.xml

Number of sitemaps in this Google sitemap index: 0

Click on the table headers to change sorting.

Maybe you didn't set the permissions on the file correctly? What does the test diagnostic report?

Share this post


Link to post
Share on other sites

Maybe you didn't set the permissions on the file correctly? What does the test diagnostic report?

hi,

the permission for the file is set to 777

not sure how to do the diagnostics report

Share this post


Link to post
Share on other sites

hi,

the permission for the file is set to 777

not sure how to do the diagnostics report

Enable that setting in admin->Configuration->Google XML SEO and manually run the script.

Share this post


Link to post
Share on other sites

Enable that setting in admin->Configuration->Google XML SEO and manually run the script.

i works fine now. i forgot to install the SQL, so i was runnig the script from the file direct

sorry for the trouble and thanks for the help.

Share this post


Link to post
Share on other sites

sorry for the trouble and thanks for the help.

No problem and you are welcome. :)

Share this post


Link to post
Share on other sites

I have tried all of the solutions in the previous posts but am still having an issue. Here is my output:

 

Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapproducts.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT / Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapproducts.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT /

Warning: fopen(D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapproducts.xml) [function.fopen]: failed to open stream: Permission denied in D:\Users\A\adorablebaby\t1.adorablebabyshop.com\googlesitemap\sitemap.class.php on line 347

ERROR: Google Product Sitemap Generation FAILED!

 

Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapcategories.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT / Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapcategories.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT /

Warning: fopen(D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapcategories.xml) [function.fopen]: failed to open stream: Permission denied in D:\Users\A\adorablebaby\t1.adorablebabyshop.com\googlesitemap\sitemap.class.php on line 347

ERROR: Google Category Sitemap Generation FAILED!

 

Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemappages.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT / Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemappages.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT /

Warning: fopen(D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemappages.xml) [function.fopen]: failed to open stream: Permission denied in D:\Users\A\adorablebaby\t1.adorablebabyshop.com\googlesitemap\sitemap.class.php on line 347

ERROR: Google Pages Sitemap Generation FAILED!

 

Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapindex.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT / Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapindex.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT /

Warning: fopen(D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapindex.xml) [function.fopen]: failed to open stream: Permission denied in D:\Users\A\adorablebaby\t1.adorablebabyshop.com\googlesitemap\sitemap.class.php on line 347

ERROR: Google Sitemap Index Generation FAILED!

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 3130

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 178

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapproducts.xml

[status] => failure

[file_exists] => true

)

 

[1] => Array

(

[file] => D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapcategories.xml

[status] => failure

[file_exists] => false

)

 

[2] => Array

(

[file] => D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemappages.xml

[status] => failure

[file_exists] => true

)

 

[3] => Array

(

[file] => D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapindex.xml

[status] => failure

[file_exists] => true

)

 

)

 

)

 

 

 

 

The path is not being picked up for some reason. Give this a try. At around line 266, find this line

		  $this->savepath = DIR_FS_CATALOG . (substr(DIR_FS_CATALOG, 0, -1) !== '/') ? '/' : '';

Below it, paste the following:

		  $this->savepath = DIR_FS_CATALOG . (substr(DIR_FS_CATALOG, 0, -1) !== '/') ? '/' : '';
									  echo 'set '.$this->savepath.'<br>';

Upload and see what happens. If that still fails, remove that change and use this instead

$this->savepath = '/home/topgoth/public_html/';

Please post the results of the first one either so I can get an idea of what the problem is.

 

Jack

Share this post


Link to post
Share on other sites

I have tried all of the solutions in the previous posts but am still having an issue. Here is my output:

 

Warning: fopen(D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapproducts.xml) [function.fopen]: failed to open stream: Permission denied in

The problem is that the sitemap files can't be opened. Are you sure they have been uploaded? Have you changed the permissions (or changed them from read only if Windows)? If those are OK, you will need to ask your host to look at it. It might be that they have fopen disabled.

Share this post


Link to post
Share on other sites

I'm new to this and I was wondering if there are any more detailed instructions on this installation for beginners? The instructions in the package are a bit vague for me.

 

Thanks in advance.

 

Linnelle

Share this post


Link to post
Share on other sites

I'm new to this and I was wondering if there are any more detailed instructions on this installation for beginners? The instructions in the package are a bit vague for me.

No, the 5 steps, 3 actually since two are setup, is about as simple as any contribution gets. Perhaps asking a question regarding the actual problem you are having will result in better help.

Share this post


Link to post
Share on other sites

No, the 5 steps, 3 actually since two are setup, is about as simple as any contribution gets. Perhaps asking a question regarding the actual problem you are having will result in better help.

 

Can you explain how i do this step...

 

Run the included google_xml_sitemap_seo.sql file using phpmyadmin.

 

 

Do i go to my cpanel and select phmyadmin and then what?

 

Thanks.

Share this post


Link to post
Share on other sites

Can you explain how i do this step...

 

Run the included google_xml_sitemap_seo.sql file using phpmyadmin.

 

 

Do i go to my cpanel and select phmyadmin and then what?

 

Thanks.

The select your database on the left, then the SQL tab on the right. Remove the contents of the text area and put the contents of google_xml_sitemap_seo.sql in it. Press GO.

 

Look for the return message above that text area when the procedure is complete.


Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Share this post


Link to post
Share on other sites

jack,

can you calrify when submitting the site maps to google, do i need to submit the index map too or only the products, categories, pages?

i have submited all including index

thanks

Share this post


Link to post
Share on other sites

jack,

can you calrify when submitting the site maps to google, do i need to submit the index map too or only the products, categories, pages?

i have submited all including index

thanks

I sent all of mine, AND put them in my robots.txt file.


Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Share this post


Link to post
Share on other sites

Hi fellas

 

I need advice on this contribution before removing Dynamic Sitemap and install Google XML Sitemap SEO.

 

I have recently changed hosting company due to old one wont allo Mod_Rewrite and now I have managed to turn on my Ultimate SEO URLs. However I noticed current Dynamic Sitemap addon generates different links to those been rewrited by SEO URLs.

 

I checked on google webmastertools and seems google bot is still able to follow those links without error. Thank God :D

 

I want to maximise my website SEO and seems would be good to replace my old Dynamic Sitemap by Google XML Sitemap SEO.

 

Now, I have a couple questions:

1. Does the sitemap created by Google XML Sitemap SEO fully compatiable with other search engines?

2. Does Google XML Sitemap SEO also automaticly submit sitemap to all major Search Engines such as Google, Bing and Yahoo? (I am asking cos Dynamic Sitemap does submit to Google, Bing, Yahoo, Ask.com upon completion automaticly.)

 

THanks

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

×