Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Dynamic SiteMap


Jack_mcs

Recommended Posts

Hello. I got the same problem.

I did the changes you said, but I still get the same error

Catchable fatal error: Object of class box could not be converted to string in /home/ercomerc/public_html/admin/includes/functions/html_output.php on line 281

 

Here is my code:

// Output a form pull down menu

function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {

$field = '<select name="' . tep_output_string($name) . '"';

 

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$field .= '>';

 

//if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

 

// For Dymanic Sitemap to work must change this line

if ( ($default == '' && $GLOBALS[$name] == $values[$i]['id']) || ($default == $values[$i]['id']) );

 

for ($i=0, $n=sizeof($values); $i<$n; $i++) {

$field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';

if ($default == $values[$i]['id']) {

$field .= ' SELECTED';

}

 

$field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';

}

$field .= '</select>';

 

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

 

return $field;

}

 

////

 

Can you help?

 

Hi guys.

I really need some help with this issue. I’ve got it working local on my pc where I do all my tests.

 

When I upload to the online server I get the error.

Catchable fatal error: Object of class box could not be converted to string in /home/ercomer/public_html/admin/includes/functions/html_output.php on line 281

 

The only difference I find is not on the code, but on the server system.

Locally I run

PHP Version: 5.1.6 (Zend: 2.1.0)

Database: MySQL 5.0.24a-community-nt

 

And the online server runs

 

5.2.1 (Zend: 2.2.0)

MySQL 4.1.22-standard

 

Could this be the cause for the error? How can I fix it?

Locally on the file html_output.php at the line 281 works with both:

 

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

 

or with

 

if ( ($default == '' && $GLOBALS[$name] == $values[$i]['id']) || ($default == $values[$i]['id']) );

 

 

But on the online server none of the lines work :'(

 

I really could do with some help.

Thanks.

Link to comment
Share on other sites

I'm not sure I understand the question but someone did upload a new category_tree file that xied some problems, according to other posts. So if you are asking if it will work, I can't answer you since I haven't tried it but it is an easy test after it is installed so if you are having the problem it fixes, I would say try it.

 

Jack

 

 

OK, my bad.

 

I see that you created the 1.6 version not the 2.0 version.

Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Link to comment
Share on other sites

Hi,

 

In the admin section I am getting this error when I try to make my .XML sitemaps,

 

Creating site map index file dated: 2008-02-10T17:19:50+00:00

Finding files in http://sitename.co.uk/

1146 - Table 'hostname-databasename.sitemap_exclude' doesn't exist

 

select exclude_file from sitemap_exclude where exclude_type != "0" and is_box="0"

 

Can anybody tell me what is going wrong?

 

Thanks,

Pompeylad.

PHP?!? Long live HTML!!!! But then again we never stop learning.

Link to comment
Share on other sites

Hi,

 

In the admin section I am getting this error when I try to make my .XML sitemaps,

 

Creating site map index file dated: 2008-02-10T17:19:50+00:00

Finding files in http://sitename.co.uk/

1146 - Table 'hostname-databasename.sitemap_exclude' doesn't exist

 

select exclude_file from sitemap_exclude where exclude_type != "0" and is_box="0"

 

Can anybody tell me what is going wrong?

 

Thanks,

Pompeylad.

 

Did you run the .sql file?

Because it say's its missing the database tabel(s).

Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Link to comment
Share on other sites

Babygurgles, I am having exactly the same problem like you have. Have you managed to solve it ?

 

In addition, my sitemap is picking up weird name like What(Shopping_cart.php), or Let (index.php). Any tips on this ?

 

 

Regards,

 

BabygurglesJan 26 2008, 02:07 AM

I installed v 3.1 out of curiosity as I've used Jacks contrib for ages.

 

Such a lot of work has gone into this it really should be applauded.

 

Sadly I don't have a lot of time and it doesn't work for me "out of the box" the information/manufacturers/Customer testimonials boxes just show as a red non link. Also when validated it kicks out some 200 errors (Although these could easily kick back to just a couple of li or ul).

 

Fantastic job though wdepot!!

Link to comment
Share on other sites

I have a question. I have an Google XML Sitemap by Chemo installed. It does a great job because the Googlebot visits my site regularly. I don't want to overkill Google with multiple sitemap contributions and violate their terms. Should I install Dynamic Sitemap or not.

 

I appreciate any advice given, thanks.

Link to comment
Share on other sites

I have a question. I have an Google XML Sitemap by Chemo installed. It does a great job because the Googlebot visits my site regularly. I don't want to overkill Google with multiple sitemap contributions and violate their terms. Should I install Dynamic Sitemap or not.

 

I appreciate any advice given, thanks.

You only need one.

Link to comment
Share on other sites

Hi guys.

I really need some help with this issue. I’ve got it working local on my pc where I do all my tests.

 

When I upload to the online server I get the error.

Catchable fatal error: Object of class box could not be converted to string in /home/ercomer/public_html/admin/includes/functions/html_output.php on line 281

 

The only difference I find is not on the code, but on the server system.

Locally I run

PHP Version: 5.1.6 (Zend: 2.1.0)

Database: MySQL 5.0.24a-community-nt

 

And the online server runs

 

5.2.1 (Zend: 2.2.0)

MySQL 4.1.22-standard

 

Could this be the cause for the error? How can I fix it?

Locally on the file html_output.php at the line 281 works with both:

 

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

 

or with

 

if ( ($default == '' && $GLOBALS[$name] == $values[$i]['id']) || ($default == $values[$i]['id']) );

But on the online server none of the lines work :'(

 

I really could do with some help.

Thanks.

 

Hi,

Please can someone help or share there knowledge on this issue? I’m still stuck here.

Did I not install the contribution correctly?

Link to comment
Share on other sites

  • 2 weeks later...
In addition, my sitemap is picking up weird name like What(Shopping_cart.php), or Let (index.php). Any tips on this ?

I was having the same problem. The basic problem is that there are single quotes in the titles of various pages. A prior posting in this topic (a few pages back) suggested changing the DEFINE_HEADING definition to remove the character, which would work, but I'd rather fix the code.

 

In the dynamic_sitemap.php file (near line 193) you need to replace:

				$p_stop = strpos($fp[$idx], "'", $p_start + 2);
			$files['name'][] = str_replace('%s', '', ucfirst(substr($fp[$idx], $p_start + 1, $p_stop - $p_start - 1)));

with:

			   $p_stop = strrpos($fp[$idx], "'");
			$files['name'][] = str_replace(array('\'%s\'','%s'), '', ucfirst(substr($fp[$idx], $p_start + 1, $p_stop - $p_start - 1)));

 

Ben

Edited by bpopelar
Link to comment
Share on other sites

  • 2 weeks later...
helo. I have a problem. i'm install dynamic sitemap and seo url by chemo. This dynamic sitemap generate map in xml for google. Links in this map is not frendly and looks like this http://perfumeryjka.pl/test/product_info.php?products_id=8 . What to do in order to remedy this problem so that look this way http://perfumeryjka.pl/test/chique-dezodor...100-ml-p-8.html

Please help me

 

I am greeting Chris

 

I have this same problem. Does anyone have a fix for this? I think Google has a problem with the ? because it says that the ? means the page is dynamic.

 

Thanks for any help.

Link to comment
Share on other sites

Just to say thanks for exelent contribution!

Installed V3.2 on my OSC2.2M2.

works fine!

 

I only have a question about CHMOD permisions because can't understand from manual what to set after instalation for six samples .xml files. Should I keep it as 666 or set to other?

 

Thanks again

Sergei

Link to comment
Share on other sites

I have a question about instalation v3.2 on 2.2RC1

 

A language file index.php has a code for 'HEADING_TITLE' what shows on dynamic_sitemap.php - 'Manufacturers_name' instead of 'Home page'

 

The code is

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  define('HEADING_TITLE', $manufacturers['manufacturers_name']. ' Products');
}
else{
  define('HEADING_TITLE', $categories['categories_name']);
}

 

What to modify to get Home page title for index.php?

 

Thanks for cotribution again!

Sergei

Link to comment
Share on other sites

  • 3 weeks later...
Thank you, I appreciate you sayin gthat. Yes, I always support mine, though it may not be as quickly as I would like. No, I haven't done an Articles Manager contribution.

 

Jack

 

Hi...I am getting this error(below) after I try to login to my administration after trying to install the Multi-vendor shipping contribution. Will dynamic sitemap help me find the problem in my administration? Everyone keeps talking about categories and site pages...so I wondering if it will detect a fix in the administration side.

 

Error!

 

Unable to determine the page link!

 

Function used:

 

tep_href_link('', '', '')

 

Signed,

Janet

Link to comment
Share on other sites

I install Dynamic Sitemap v 2.0 by kit

I see that it is based on MS2, but I am using 2.2rc2a

Does this sitemap work on 2.2rc2a?

I have read from page 20 and up and can't seem to find answer to my problem.

 

I have two errors that are shown below:

Any help would be appreciated.

 

Site Map

 

data = array(); while ($categories = tep_db_fetch_array($categories_query)) { $this->data[$categories['parent_id']][$categories['categories_id']] = array('name' => $categories['categories_name'], 'count' => 0);} } //end class osC_CategoryTree function buildBranch($parent_id, $level = 0) { $result = $this->parent_group_start_string; //starts the

tag if (isset($this->data[$parent_id])) { foreach ($this->data[$parent_id] as $category_id => $category) { $category_link = $category_id; $result .= $this->child_start_string; // prints

if (isset($this->data[$category_id])) {$result .= $this->parent_start_string;} //prints nothing if ($level == 0) {$result .= $this->root_start_string;} //prints nothing $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level) . ''; $result .= $category['name']; $result .= ''; if ($level == 0) {$result .= $this->root_end_string;} //prints nothing if (isset($this->data[$category_id])) {$result .= $this->parent_end_string;} //prints

if (isset($this->data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1))) { $result .= $this->buildBranch($category_id, $level+1);} $result .= $this->child_end_string; //prints }// end foreach } // end if (isset $result .= $this->parent_group_end_string; // return $result; } //end function function buildTree() { return $this->buildBranch($this->root_category_id);}} ?>

Fatal error: Class 'osC_CategoryTree' not found in C:\Program Files\EasyPHP\www\catalog\dynamic_sitemap.php on line 58

 

And in Admin panel when I click on "sitemap" I receive the following message:

 

Sitemap

 

'.TEXT_EXCLUDE_FOR_UNREG.tep_draw_radio_field('ex_type','unreg');?>

 

'.TEXT_EXCLUDE_FOR_UNREG.tep_draw_radio_field('ex_type','unreg');?>

 

 

('.( $exclude['exclude_type'] == 1 ? TEXT_ALL : TEXT_UNREG ).') '.TEXT_INCLUDE.'

'; } ?>

 

('.( $exclude['exclude_type'] == 1 ? TEXT_ALL : TEXT_UNREG ).') '.TEXT_INCLUDE.'

'; } ?>

Link to comment
Share on other sites

I install Dynamic Sitemap v 2.0 by kit

I see that it is based on MS2, but I am using 2.2rc2a

Does this sitemap work on 2.2rc2a?

I have read from page 20 and up and can't seem to find answer to my problem.

 

I have two errors that are shown below:

Any help would be appreciated.

 

Site Map

 

data = array(); while ($categories = tep_db_fetch_array($categories_query)) { $this->data[$categories['parent_id']][$categories['categories_id']] = array('name' => $categories['categories_name'], 'count' => 0);} } //end class osC_CategoryTree function buildBranch($parent_id, $level = 0) { $result = $this->parent_group_start_string; //starts the

tag if (isset($this->data[$parent_id])) { foreach ($this->data[$parent_id] as $category_id => $category) { $category_link = $category_id; $result .= $this->child_start_string; // prints

if (isset($this->data[$category_id])) {$result .= $this->parent_start_string;} //prints nothing if ($level == 0) {$result .= $this->root_start_string;} //prints nothing $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level) . ''; $result .= $category['name']; $result .= ''; if ($level == 0) {$result .= $this->root_end_string;} //prints nothing if (isset($this->data[$category_id])) {$result .= $this->parent_end_string;} //prints

if (isset($this->data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1))) { $result .= $this->buildBranch($category_id, $level+1);} $result .= $this->child_end_string; //prints }// end foreach } // end if (isset $result .= $this->parent_group_end_string; // return $result; } //end function function buildTree() { return $this->buildBranch($this->root_category_id);}} ?>

Fatal error: Class 'osC_CategoryTree' not found in C:\Program Files\EasyPHP\www\catalog\dynamic_sitemap.php on line 58

 

And in Admin panel when I click on "sitemap" I receive the following message:

 

Sitemap

 

'.TEXT_EXCLUDE_FOR_UNREG.tep_draw_radio_field('ex_type','unreg');?>

 

'.TEXT_EXCLUDE_FOR_UNREG.tep_draw_radio_field('ex_type','unreg');?>

 

 

('.( $exclude['exclude_type'] == 1 ? TEXT_ALL : TEXT_UNREG ).') '.TEXT_INCLUDE.'

'; } ?>

 

('.( $exclude['exclude_type'] == 1 ? TEXT_ALL : TEXT_UNREG ).') '.TEXT_INCLUDE.'

'; } ?>

It's not installed correctly. I'm not sure about what the first error is. If all of that text is being displayed, then you added or removed a php delimiter in one of the files. Otherwise, it is saying it is missinga file. In the second, anytime capital letters are seen like that, it means the definitions were not added. So you need to go back through the installation and correct those items.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

This is the support thread for the Dynamic SiteMap contribution. Based on the SiteMap MS2 contribution, it allows the full shop to be automatically listed and updated dynamically.

 

Jack

I added this contrib a few days ago and it works fine, with only one problem. My bandwidth is going crazy. I am burning up 600 MB of bandwidth on about 25-30 visitors/day. According to my stats page 95% of it is being used by Dynamic PHP Script file. Did I do something wrong? How can I get my bandwidth under control?

 

Thanks,

 

Dan

Link to comment
Share on other sites

I added this contrib a few days ago and it works fine, with only one problem. My bandwidth is going crazy. I am burning up 600 MB of bandwidth on about 25-30 visitors/day. According to my stats page 95% of it is being used by Dynamic PHP Script file. Did I do something wrong? How can I get my bandwidth under control?

 

Thanks,

 

Dan

All the files in oscommerce are "Dynamic PHP Script" files. If you think it is this one, then try disabling it to be sure. It could be that the search engines are finding it and are indexing all of your pages, which is its purpose.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 4 weeks later...

I've installed last version of this contribution without particullary problems expect this on admin/sitemap.php:

 

Error! Can’t open catalog dir : /www/htdocs/primocontatto.com/

 

Maybe, because my path is:

 

/usr/www/htdocs/primocontatto.com/

 

how i can resolve this?

Thanks :blush:

Edited by primocontatto
Link to comment
Share on other sites

Definitely a path issue. The error is telling you there is no /www/htdocs/primocontatto.com/ OR possibly the permissions are wrong.

 

No one can halp me? :'(

(look to my last post)

Link to comment
Share on other sites

Hi to all,

 

Hope someone can help.

I have carefully followed the instructions step-by-step and installed this mod. It shows under Tools > sitemap maintenance but when I click on submit I get get the following error:

 

Warning: fopen(/usr/www/users/mysite/sitemaps.xml) [function.fopen]: failed to open stream: Permission denied in /usr/www/users/mysite/admin/create_xml_sitemaps.php on line 117

Unable to create site map index file!

 

It also does this with write permission enabled.

 

Thanks

Link to comment
Share on other sites

Installed V3 and I have a question that has been asked before, but doesn't seem to work in this version.

 

I would like to sort the pages that show up on the right side from the root. There have been a few suggestions in the past, but they all say to add the code in the modules/dynamic_sitemap.php. This version combines all into one file. dynamic_sitemap.php Nothing I do sorts the pages. Has anyone gotten the sort code to work or know how to do it?

 

Thanks in advance for anyone's help!

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.

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