Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google XML Sitemap w/ Admin support


Guest

Recommended Posts

mombutu, I was looking again the code from this contribution (SEF URL, the yours), please try this also, especially if the last did not work

 

look the line 133-135 in catalog/sitemaps.index.php (its the responsible class for the SEO)

 

its

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

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

$seo_urls = new SEO_URL($languages_id);

 

change to:

 

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

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

$seo_urls = new SEO_URL($languages_id); */

 

include_once(DIR_WS_CLASSES . 'http_client.php');

$u = new httpClient();

$url = $u->url['path']];

 

 

if ( file_exists(DIR_WS_CLASSES . 'url_write.php') ){

require_once(DIR_WS_CLASSES . 'url_write.php');

$seo_urls = new transform_url($url);

 

Let me know your results, in fact I dont think my prior post works, but I think that this one it could

 

Good luck

Regards

Jonatan

Hi Jonathan - i tried all the suggestions for generating SEO friendly urls and finally got it working - but one extra step..

need to edit sitemapclass.php as well as sitemaps.index.php

 

find around line 1109

if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') ) {

replace this one also with whatever method you have selected to - i used the suggested sql config key SEO_SITEMAPS so i have changed the above to :

if ( (SEO_SITEMAPS == 'true') ) {

 

thsi now generates the correct nicely formatted urls that are used with ultimate seo contrib.

incidently I also dont have url_write.php in includes\classes but it still works which is good.

 

thanks for the contrib.

note your above code should read

	$url = $u->url['path'];

and not have double ']' character.

Regards

Mark Brindle

Link to comment
Share on other sites

Hi

I just installed this contribution but for some reason i am not getting the site map.

 

I am able to see it in tools and when i click to create site map , i am just getting a blank new page.

 

could some one tell me what the problem might be.

 

Thanks

Ajay.

Link to comment
Share on other sites

Hi

I just installed this contribution but for some reason i am not getting the site map.

 

I am able to see it in tools and when i click to create site map , i am just getting a blank new page.

 

could some one tell me what the problem might be.

 

Thanks

Ajay.

 

Hi all i got the blank page problem solved but now i am getting the following errors

 

ERROR: Google Product Sitemap Generation FAILED!

 

ERROR: Google Category Sitemap Generation FAILED!

 

ERROR: Google Sitemap Index Generation FAILED!

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 52

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 12

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /var/www/vhosts/safepune.com/httpdocs//sitemapproducts.xml

[status] => failure

[file_exists] => true

)

 

[1] => Array

(

[file] => /var/www/vhosts/safepune.com/httpdocs//sitemapcategories.xml

[status] => failure

[file_exists] => true

)

 

[2] => Array

(

[file] => /var/www/vhosts/safepune.com/httpdocs//sitemapindex.xml

[status] => failure

[file_exists] => true

)

 

)

 

)

 

[file_exists] => true this was false at first but i just created those three files and it now reflects true so, it means that the files are being accessed but i do not know why these errors are happening. I am using STS can that cause any problem?

I also have added other pages like faq.

 

Please Help

you can check my site here

 

Thanks

Ajay.

Link to comment
Share on other sites

  • 4 weeks later...
Thanks for your contribution - i hope it will work for me as good for most of the ohers here!

 

But right now I'm facing some bad problems - this is the message that appears when clicking the first link in the admin-area of googlestiemap.php:

Fatal error: Cannot redeclare tep_db_connect() (previously declared in <...confidential....>/includes/functions/database.php:13) in <...confidential....>/includes/functions/database.php on line 13

 

The path in the error message seems to be exactly the same. I found no double entry of tep_db_connect in my includes/functions/database.php-file. But what I found was, that the same declaration of tep_db_connect() exists once in the catalog/includes-path and once in the admin/includes-path.

 

As far as I can see I cant turn of the tep_db_connect function in either of the two files because of all other processes and files that need the database.php files.

Is there anyone that can help me or explain why this is happening?

 

Thanks in advance....

 

Uli

 

ditto here. if i figure it out ill let ya know. anyone else even encounter this?

Link to comment
Share on other sites

My sitemap will only pick up two levels of categories.

 

For Instance i wanted to do Craft Supplies/Bone & Horn/Hairpipe

 

It wont show the hairpipe in the site map. Only shows two levels deep. Anyone have their sitemap showing deeper levels of subcategories like 3 and 4 deep??

 

Thanks in advance.

Link to comment
Share on other sites

  • 2 months later...

I also have the problem that my osCommerce is installed in the root directory and that I get the following error:

 

Not Found
The requested URL /admin/sitemaps.index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

This has to do something with the directory configuration as some people before have pointed out. However I'm helpless and don't know what I could change to solve this.

 

Any suggestions would be appreciated!

Link to comment
Share on other sites

  • 3 months later...

I have installed the google XML sitemap with admin to the OSC V2.2 RC1 in the admin page under the tab "Google Site Maps" i get this message

TITLE_GOOGLE_SITEMAPS

 

OVERVIEW_TITLE_GOOGLE_SITEMAPS

 

OVERVIEW_GOOGLE_SITEMAPS

 

INSTRUCTIONS_TITLE_GOOGLE_SITEMAPS

 

INSTRUCTIONS_STEP1_GOOGLE_SITEMAPSINSTRUCTIONS_CLICK_GOOGLE_SITEMAPSEXEC_GOOGLE_

SITEMAPSINSTRUCTIONS_END1_GOOGLE_SITEMAPS

 

INSTRUCTIONS_NOTE_GOOGLE_SITEMAPS

 

INSTRUCTIONS_STEP2_GOOGLE_SITEMAPSINSTRUCTIONS_CLICK_GOOGLE_SITEMAPSEXEC_GOOGLE_

SITEMAPSINSTRUCTIONS_END2_GOOGLE_SITEMAPS

 

INSTRUCTIONS_COMPLETE_GOOGLE_SITEMAPS

Link to comment
Share on other sites

  • 5 weeks later...
Hi All,

 

I recently installed the "Google XML Sitemap w/ Admin" mod. I (think) I followed all the instructions to the letter, however when I enter the admin->tools->google sitemaps and click on the step one button I get the following message in a popup window.

 

------ ERROR MESSAGE ------

 

Warning: main(includes/languages/english/FILENAME_GOOGLE_SITEMAPS): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/sharpe-family.co.uk/subdomains/deliclass/httpdocs/osCommerce/sitemaps.index.php on line 33

 

Fatal error: main(): Failed opening required 'includes/languages/english/FILENAME_GOOGLE_SITEMAPS' (include_path='.:/php/includes:/usr/local/psa/apache_base/2005-04-21/apache_nossl/lib/php') in /usr/local/psa/home/vhosts/sharpe-family.co.uk/subdomains/deliclass/httpdocs/osCommerce/sitemaps.index.php on line 33

 

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

 

Ive probably done something very simple wrong, if anyone could shed some light on this I will be most grateful!

 

anyone got a solution to this??? I have the same problem .... help please ----------- ok got this working now!!! All i had to do was add

 

// Google site maps

define('FILENAME_GOOGLE_SITEMAPS', 'sitemaps.index.php');

//Fine

 

to admin/includes/languages/english ! now my sitemap has been generated and submitted to google ....

Edited by weddingdayessentials
Link to comment
Share on other sites

  • 3 weeks later...
anyone got a solution to this??? I have the same problem .... help please ----------- ok got this working now!!! All i had to do was add

 

// Google site maps

define('FILENAME_GOOGLE_SITEMAPS', 'sitemaps.index.php');

//Fine

 

to admin/includes/languages/english ! now my sitemap has been generated and submitted to google ....

 

Got the same problem in /admin/googlesitemap.php

 

TITLE_GOOGLE_SITEMAPS

OVERVIEW_TITLE_GOOGLE_SITEMAPS

OVERVIEW_GOOGLE_SITEMAPS

.............

 

Above is a wrong solution - define('FILENAME... should work for filenames.php not for language file admin/includes/languages/english.php

 

anyway, to remove problem check what you uploaded

admin/includes/languages/english/googlesitemap.php

 

Sergei

Edited by leveera
Link to comment
Share on other sites

Got the same problem in /admin/googlesitemap.php

 

TITLE_GOOGLE_SITEMAPS

OVERVIEW_TITLE_GOOGLE_SITEMAPS

OVERVIEW_GOOGLE_SITEMAPS

.............

 

Above is a wrong solution - define('FILENAME... should work for filenames.php not for language file admin/includes/languages/english.php

 

anyway, to remove problem check what you uploaded

admin/includes/languages/english/googlesitemap.php

 

Sergei

 

it worked for me but apparently its not the correct solution. Please disregard my original post.

Link to comment
Share on other sites

to all the people with Chemo SEO URLS Enabled if you look closely in sitemap.class.php

 

chemo has left the original switch between search engine friendly urls and his own SEO URL contrib in the file...

 

look at line 1108 & 1109 and flip the commented line out...simple as that

 

change this

	//if ( defined('SEO_URLS') && SEO_URLS == 'true' || defined('SEO_ENABLED') && SEO_ENABLED == 'true' ) {
	if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') ) {

 

to this

	if ( defined('SEO_URLS') && SEO_URLS == 'true' || defined('SEO_ENABLED') && SEO_ENABLED == 'true' ) {
	//if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') ) {

 

good rankings to all osc'ers :thumbsup:

The sooner you fall behind, the more time you'll have to catch up.

Link to comment
Share on other sites

  • 2 weeks later...

For those having a problem with the double slashes i.e. //sitemapproducts.xml here's how I fixed that:

 

In sitemap.class.php, line 554,

 

change

$filename = $this->savepath . '/' . $this->filename . $type;

 

to

$filename = $this->savepath . $this->filename . $type;

 

I suspect this is due to using a different directory to catalog, and perhaps from specifying the directory with a trailing slash in config?

Link to comment
Share on other sites

  • 2 weeks later...
Thanks for your contribution - i hope it will work for me as good for most of the ohers here!

 

But right now I'm facing some bad problems - this is the message that appears when clicking the first link in the admin-area of googlestiemap.php:

Fatal error: Cannot redeclare tep_db_connect() (previously declared in <...confidential....>/includes/functions/database.php:13) in <...confidential....>/includes/functions/database.php on line 13

 

The path in the error message seems to be exactly the same. I found no double entry of tep_db_connect in my includes/functions/database.php-file. But what I found was, that the same declaration of tep_db_connect() exists once in the catalog/includes-path and once in the admin/includes-path.

 

As far as I can see I cant turn of the tep_db_connect function in either of the two files because of all other processes and files that need the database.php files.

Is there anyone that can help me or explain why this is happening?

 

Thanks in advance....

 

Uli

 

I also had this problem and decided to look into it more deeply.... The solution that worked for me was very simple indeed...

 

In sitemaps_index.php find the following line..

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_GOOGLE_SITEMAPS));

 

chdir('../');

 

 

and change to

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_GOOGLE_SITEMAPS));

 

//chdir('../');

 

and thats it.... my now works perfect....

 

 

Hope this helps other people with the same problem....

Link to comment
Share on other sites

  • 4 weeks later...

Anyone having the problem with line 592 in sitemap.class.php it seems that it is a simple permission problem. To put it simply, the file does not have permission to create/edit the sitemapindex.xml files. You need to change the permission on the catalog/ folder to 770 in order to allow the script to create/modify the .xml files.

Link to comment
Share on other sites

  • 2 weeks later...
ERROR: Google Product Sitemap Generation FAILED!

 

ERROR: Google Category Sitemap Generation FAILED!

 

Generated Google Sitemap Index Successfully

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 1

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 1

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /home/prettypi/public_html/lovetogame.co.uk//sitemapindex.xml

[status] => success

[file_exists] => true

)

 

)

 

)

 

Hi, I have installed this contribution out of the box on one of my sites, and on my other site with a different hosting company, it is not working. I get the database error, so i use the updated sitemap.index.php file, which solves that problem, but then it does not create my sitemaps, although Ive set the write permissions. Anyone know what the problem could be?

 

Thanks

Link to comment
Share on other sites

  • 1 month later...

I have looked for this answer, but can't find anyone with similar problems....

 

I installed the contribution. I have the Admin tool, and when I click on the link in Step 1, it seems to work properly: i.s. it opens a new page and shows the Sitemaps were successfully created. However, when I look atr the files they have not changed. If I remove teh XML files, it still says they are created successfully but they don't appear. And the sitemaps are CHMOD 777

 

Any ideas? Somehow I got it to work 1 time, because the default sitemaps changed to my information. But it doesn't seem to wan to work again.

 

I went through the install diections several times to make sure.

Link to comment
Share on other sites

Hi Azer,

 

I have exactly the same problem with different languages for my products (English and Dutch).

I installed Google XML Sitemap - Admin 2.2 + Better README dated 22 March 2007.

When i generate the sitemap i only get it in the language i have choosen in the admin, so

only in English OR Dutch. But i need the links in both languages!

 

The Multi languages Page submit solution posted by Mediatree 3 Apr 2006 does not work for this version,

(i also have Ultimate SEO installed)

 

Did you find a solution for this problem?

 

Thanks,

Eric :rolleyes:

 

Hi Eric,

 

Did you found a working solution for multilanguage sitemaps ?

I use the same contribs...

 

thanks,

 

Laci

Link to comment
Share on other sites

I have looked for this answer, but can't find anyone with similar problems....

 

I installed the contribution. I have the Admin tool, and when I click on the link in Step 1, it seems to work properly: i.s. it opens a new page and shows the Sitemaps were successfully created. However, when I look atr the files they have not changed. If I remove teh XML files, it still says they are created successfully but they don't appear. And the sitemaps are CHMOD 777

 

Any ideas? Somehow I got it to work 1 time, because the default sitemaps changed to my information. But it doesn't seem to wan to work again.

 

I went through the install diections several times to make sure.

 

Thought I would ask one more time. I installed, have checked 5 times to see if everything is s directed. Everything appears to work, and I get the success message. But the sitemap XML files never get updated.

 

Any ideas anyone?

Link to comment
Share on other sites

Thought I would ask one more time. I installed, have checked 5 times to see if everything is s directed. Everything appears to work, and I get the success message. But the sitemap XML files never get updated.

 

Any ideas anyone?

 

Have you tried to debug by placing some echo's in the function where th efiles are created (SaveFile())?

Shouldn't be too difficult, might be an idea to log the gid and uid as well, at my hosting they 'changed' something resulting in strange behavior there. The solution for me was to enter admin through the domain url while i was working with the linux server name untill then.

Regards,

Paul

Link to comment
Share on other sites

  • 4 weeks later...
To gmltw

Try setting "true" on Admin, Configuration, My Store, Use Search-Engine Safe URLs (still in development). That workes for me, and re test the sitemap creation in its section.

Good luck

Jon

 

Jonatan,

 

Your advice to Set "Use Search-Engine Safe URLs (still in development)" to true, is VERY VERY BAD. Changing this setting causes OSC to throw errors in various places, and worse these errors are not obvious.

 

One of the errors is in the shopping cart and it prevents customers, unless they are technically savvy, from checking out.

 

This setting SHOULD NOT be changed. It's "still in development" for a reson. And please do not tell folks to turn on this setting.

 

Just look at the number of misconfigured OSC installations on-line...

 

http://www.google.com/search?hl=en&saf...art=20&sa=N

Link to comment
Share on other sites

  • 3 months later...

Hello all,

I get the followin error message updating sitemaps:

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/qink/domains/q-inkshop.nl/public_html/winkel/includes/application_top.php on line 316

 

Please inform me how to get rid of that.

 

Thanks

Ton

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...