Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Google XML Sitemap Feed - by Chemo


Guest

Recommended Posts

Help!

 

Anybody know why it is using the old url parameters and not bobbys seo ones?

 

i get links generated like this "product_info.php?products_id=75"

 

but i am using Ultimate SEO URLs v2.0b and Google XML Sitemap Feed v1.3

 

any ideas why its going wrong?

Edited by Mighty Mike
Link to comment
Share on other sites

Mike,

 

In googlesitemap/index.php find this code:

	if ( file_exists(DIR_WS_CLASSES . 'cache.class.php') ){
 include(DIR_WS_CLASSES . 'cache.class.php');
 $cache = new cache($languages_id);
 if ( file_exists('includes/seo_cache.php') ){
	 include('includes/seo_cache.php');
 }

and change it to this:

	if ( file_exists(DIR_WS_CLASSES . 'cache.class.php') ){
 echo 'File: ' . DIR_WS_CLASSES . 'cache.class.php exists and is being included' . "\n\n";
 include(DIR_WS_CLASSES . 'cache.class.php');
 $cache = new cache($languages_id);
 if ( file_exists('includes/seo_cache.php') ){
	 echo 'File: ' . 'includes/seo_cache.php exists and is being included' . "\n\n";
	 include('includes/seo_cache.php');
 }

Run the index.php script again and see if the files are being included.

Link to comment
Share on other sites

Look at the output from the index.php. If the files are being included it will say:

 

File: XXX is being included.

 

It'll say this twice...once for each file needed to generate SEO URLs.

Link to comment
Share on other sites

Generated Google Product Sitemap Successfully

 

Generated Google Category Sitemap Successfully

 

Generated Google Sitemap Index Successfully

 

CONGRATULATIONS! All files generated successfully.

 

this output? sorry not 100% sure on what you mean

Link to comment
Share on other sites

ok had a look and i dont have a "if ( file_exists(DIR_WS_CLASSES . 'cache.class.php') ){" cache.class.php file in includes/classes but i do have a page_cache.php file shall i change the code to use that one?

 

but i do have this file " if ( file_exists('includes/seo_cache.php') ){

"

Link to comment
Share on other sites

The code should still work for SEO URLs v1.x through the current v2.1c release (at least as a beginner at this whole osC thing I suspect it would be...after all I only have a few posts:)).

 

At any rate, download the latest v1.3 release of the Google Sitemap and overwrite the index.php and sitemap.class.php files.

 

Then, give it another go...

Link to comment
Share on other sites

i also dont have this file either

 

if ( file_exists(DIR_WS_CLASSES . 'seo.class.php') ){

require_once(DIR_WS_CLASSES . 'seo.class.php');

$seo_urls = new SEO_URL($languages_id);

}

 

maybe i should just upgrade to a later version :-"

Edited by Mighty Mike
Link to comment
Share on other sites

It is my understanding that the new v2.1c release is still buggy with respect to the redirect code and the author is tring to get it worked out. The issue is with the $_SERVER['PATH_INFO'] variable population on CGI mode servers versus SAPI mode.

 

It may be of value to upgrade now as the next release (ironically v2.2) will be the final dot release (to my understanding). Hence, upgrade now for the sitemap and then later once the final release is uploaded the procedure to uprgade is simply overwrite the base class and visit the store.

Link to comment
Share on other sites

Just installed and when i go to catalog/googlesitemap/index.php

 

I get this error

 

Warning: mysql_connect(): Access denied for user: 'httpd@localhost' (Using password: NO) in /var/hsphere/local/home/removerd/domain.com/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

Link to comment
Share on other sites

Thanks BeTheWater

 

I will upgrade to v2.0b now, and as you say, once the 2.1x version is ironed out ill upgrade to that at a later date.

 

Its a real shame and a great loss is all i can say, I wish Bobby all the best in the future at whatever he does and will pop onto his board for any updates.

Link to comment
Share on other sites

Thanks BeTheWater

 

I will upgrade to v2.0b now, and as you say, once the 2.1x version is ironed out ill upgrade to that at a later date.

 

Its a real shame and a great loss is all i can say, I wish Bobby all the best in the future at whatever he does and will pop onto his board for any updates.

I would recommend that you upgrade all the way to the latest v2.1c

 

Once you do go to the admin control panel and de-activate the redirect script.

 

Then, leave the "old" redirect code in place from the v1.4 install you have now. This will effectively keep what works on your store working (the redirects) and get the benefits of the new code base (which are verified to be compatible).

 

If you don't have the old redirect script in place then there is nothing that should be stopping you from upgrading.

 

With respect to this "Bobby" character...it is a shame but I'm sure he will miss the community and look beyond the political bullshit (and forgive the ones that trashed him after he was gone) and find some way of helping the ones that matter...the store owners...even if that means he has to sneak around. Of course, I don't know the man but know his kind. Words like integrity, dedication, duty, loyalty and honor actually still mean something.

 

BeTheWater

Link to comment
Share on other sites

And the user "httpd" is a valid MySQL user on your system and has access to your store database?

 

No "httpd" is not a valid user

 

But the SQL Path files are correct so i don't know were that is comming from as the site is working fine?

 

all other parts of the site are calling from the SQL DB OK?

Link to comment
Share on other sites

No "httpd" is not a valid user

 

But the SQL Path files are correct so i don't know were that is comming from as the site is working fine?

 

all other parts of the site are calling from the SQL DB OK?

OK...hardcode it.

 

In googlesitemap/index.php find this code:

tep_db_connect() or die('Unable to connect to database server!');

and change it to this:

tep_db_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE) or die('Unable to connect to database server!');

If that does not work I don't know what to tell you...it's using the defined constants from your configure.php file...

Link to comment
Share on other sites

OK...hardcode it.

 

In googlesitemap/index.php find this code:

tep_db_connect() or die('Unable to connect to database server!');

and change it to this:

tep_db_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE) or die('Unable to connect to database server!');

If that does not work I don't know what to tell you...it's using the defined constants from your configure.php file...

 

Nope that did't work tks for the help

 

in "database.php"

 

this is the lines of code

if (USE_PCONNECT == 'true') {

$$link = mysql_pconnect($server, $username, $password);

} else {

$$link = mysql_connect($server, $username, $password);

}

 

This is line 19 "$$link = mysql_connect($server, $username, $password);" from above

in the config.php is this

 

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

 

could that be the problem? as i said the site is working for cats and products so it must be calling from the DB?

 

Is their only 2 config.php for the path to mySQL? one in catalog and one in admin?

Link to comment
Share on other sites

Nope that did't work tks for the help

 

in "database.php"

 

this is the lines of code

    if (USE_PCONNECT == 'true') {

      $$link = mysql_pconnect($server, $username, $password);

    } else {

      $$link = mysql_connect($server, $username, $password);

    }

 

This is line 19 "$$link = mysql_connect($server, $username, $password);" from above

in the config.php is this

 

  define('USE_PCONNECT', 'false');

  define('STORE_SESSIONS', 'mysql');

 

could that be the problem? as i said the site is working for cats and products so it must be calling from the DB?

 

Is their only 2 config.php for the path to mySQL? one in catalog and one in admin?

 

Could it be that my site is not running on https??

Link to comment
Share on other sites

I would recommend that you upgrade all the way to the latest v2.1c

 

Once you do go to the admin control panel and de-activate the redirect script.

 

Then, leave the "old" redirect code in place from the v1.4 install you have now.  This will effectively keep what works on your store working (the redirects) and get the benefits of the new code base (which are verified to be compatible).

 

If you don't have the old redirect script in place then there is nothing that should be stopping you from upgrading.

 

With respect to this "Bobby" character...it is a shame but I'm sure he will miss the community and look beyond the political bullshit (and forgive the ones that trashed him after he was gone) and find some way of helping the ones that matter...the store owners...even if that means he has to sneak around.  Of course, I don't know the man but know his kind.  Words like integrity, dedication, duty, loyalty and honor actually still mean something.

 

BeTheWater

 

 

Cheers BeTheWater (What film is that out of?) :blink:

 

Did the upgrade to 2.0b and all is working fine now :D All my indexed pages are with the SEO urls and also the site is not live yet so i dont need the redirect script.

I will upgrade it again soon.

 

Would i need to resubmit my pages to google again? or what we are doing is just telling google to use these pages for links/crawl.?

 

Thanks for your help

 

Cheers

 

Mike :thumbsup:

Link to comment
Share on other sites

Hi,

 

I have this problem after installing this contribution 5 Jun 2005 - http://www.oscommerce.com/commuGoogle XML Sitemap Feed v1.3

 

Calling:

http://www.mysite.com/catalog/googlesitemap/index.php

 

I have this error:

Generated Google Product Sitemap Successfully

 

Generated Google Category Sitemap Successfully

 

 

 

Fatal error: Call to undefined function: glob() in /home/virtual/site8/fst/var/www/html/catalog/googlesitemap/sitemap.class.php on line 372

 

Could any one help me to rosolve this problem?

 

My store have two language istalled

 

Thanks

Link to comment
Share on other sites

Hi Guys,

 

I have just installed the latest version of this great contrib and everything was going rosey until I submitted the sitemapindex.xml to the BIG G.

 

These are the error I am getting.

 

Error Message Descriptions

 

Compression error

    Error with Sitemap compression. Please recompress the file and resubmit.

DNS error

    Please verify that your Sitemap entries are correct and resubmit your Sitemap.

DNS timeout

    Timed out waiting for DNS server to respond. Please verify that your DNS entries are correct and resubmit your Sitemap.

Denied

    We were unable to access the URL you provided due to a restriction in robots.txt. Please make sure the robots.txt file and the Sitemap URL are correct and resubmit your Sitemap.

Empty Sitemap

    Your Sitemap does not contain any URLs. Please validate and resubmit your Sitemap.

HTTP 400 error

    We were unable to access the URL you provided. Please make sure the Sitemap URL is correct and resubmit your Sitemap.

HTTP 500 error

    The server returned an error when we tried to access the URL provided. Please verify that the Sitemap URL is correct and resubmit your Sitemap.

Invalid date

    An invalid date was found. Please validate your Sitemap before resubmitting.

Not found

    We couldn't find the Sitemap at the location you provided. Please make sure the Sitemap URL is correct and resubmit your Sitemap.

Parsing error

    We were unable to read your Sitemap. It may contain an entry we are unable to recognize. Please validate your Sitemap before resubmitting.

Pending

    Your Sitemap has been submitted. Reports may take several hours to update. Thank you for your patience!

Recursive Index

    A Sitemap Index may not directly or indirectly reference itself. Please fix your Sitemap Index before resubmitting.

Robots.txt timeout

    Timed out downloading robots.txt. Please make sure your server is responding correctly and resubmit your Sitemap.

Sitemap timeout

    Timed out downloading your Sitemap. Please make sure your server is responding correctly and resubmit your Sitemap.

Temporary error

    Our system experienced a temporary problem. Please try again in a few minutes.

Too many Sitemaps

    Your index file contains too many Sitemaps. Please create multiple index files with up to 1000 Sitemaps each and submit all index files.

Too many URLs

    Your Sitemap contains too many URLs. Please create multiple Sitemaps with up to 50000 URLs each and submit all Sitemaps.

 

HELP!!!!!!!!!!! where do I start????

 

Come back Bobby, we lurve you......................

 

Thanks

 

Mark

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...