Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Dynamic SiteMap


Jack_mcs

Recommended Posts

Are you sure you installed the Dynamic Sitemap contribution? The problem you are having is common with the MS2 Sitemap contribution. Of course, I suppose someone could have done the same to this one. Either way, the problem is that someone uploaded a version that includes code for another contribution. You will have to remove that code or try a version that is done correctly.

 

Jack

Edited by Jack_mcs

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

A quick reminder for anyone getting the following error message on their Dynamic Sitemap page after updating to the the latest version of HTC:

 

Error!

 

Unable to determine the page link!

 

Remeber to go into catalog/includes/modules/dynamic_sitemap.php and add the line:

 

strpos($file, 'header_tags')		   !== FALSE ||

 

Hope it saves someone else a bit of head scratching......

 

P.S. Thanks again for the contribs Jack !

Link to comment
Share on other sites

Hi,

 

I've been attempting to install this contrib to my store at http://www.sweetiesdirect.co.uk

 

When I get to the final stage in the readme,

6) In admin/includes/boxes/tools.php

FIND:
define('BOX_TOOLS_WHOS_ONLINE', 'Who\'s Online');
AFTER IT ADD:
define('BOX_TOOLS_SITEMAP', 'Sitemap');

FIND:
define('IMAGE_UPLOAD', 'Upload');
AFTER IT ADD:
define('IMAGE_EXCLUDE', 'Exclude');

 

I cannot find the specified extracts of code in the .../tools.php file. My .../tools.php file looks like this;

 

<?php
/*
 $Id: tools.php,v 1.21 2003/07/09 01:18:53 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- tools //-->
	  <tr>
		<td>
<?php
 $heading = array();
 $contents = array();

 $heading[] = array('text'  => BOX_HEADING_TOOLS,
				 'link'  => tep_href_link(FILENAME_BACKUP, 'selected_box=tools'));

 if ($selected_box == 'tools') {
$contents[] = array('text'  => '<a href="' . tep_href_link(FILENAME_BACKUP) . '" class="menuBoxContentLink">' . BOX_TOOLS_BACKUP . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_BANNER_MANAGER) . '" class="menuBoxContentLink">' . BOX_TOOLS_BANNER_MANAGER . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_CACHE) . '" class="menuBoxContentLink">' . BOX_TOOLS_CACHE . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_DEFINE_LANGUAGE) . '" class="menuBoxContentLink">' . BOX_TOOLS_DEFINE_LANGUAGE . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_FILE_MANAGER) . '" class="menuBoxContentLink">' . BOX_TOOLS_FILE_MANAGER . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_MAIL) . '" class="menuBoxContentLink">' . BOX_TOOLS_MAIL . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_NEWSLETTERS) . '" class="menuBoxContentLink">' . BOX_TOOLS_NEWSLETTER_MANAGER . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_SERVER_INFO) . '" class="menuBoxContentLink">' . BOX_TOOLS_SERVER_INFO . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_SITEMAP) . '" class="menuBoxContentLink">' . BOX_TOOLS_SITEMAP . '</a><br>' . //dynamic sitemap control

							   '<a href="' . tep_href_link(FILENAME_WHOS_ONLINE) . '" class="menuBoxContentLink">' . BOX_TOOLS_WHOS_ONLINE . '</a>');
 }

 $box = new box;
 echo $box->menuBox($heading, $contents);
?>
		</td>
	  </tr>
<!-- tools_eof //-->

 

Can anybody advise?

 

Thanks,

Link to comment
Share on other sites

There are two allprods.php files. make sure they are in the correct directories (root and english). If they are mixed up, they can cause such a problem.

 

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

For the time being I have reverted back to the static sitemap, until I can figure out what is causing the problem.

I messed my Sitemap about a month ago. I was making my sitemap for Google and a text sitemap for yahoo and I accidentally saved it at sitemap.php. I was a bit concerned that MSN wouldn't know what to do, but apparently they spidered me fine. It's been like that for a month now:

http://www.lakeland-printing.com

Link to comment
Share on other sites

I don't have any allprods.php files :blink:

 

The Dynamic Sitemap V2.0 folder which I downloaded only contained one file which was to be placed in root, called dynamic_sitemap.php

I'm sorry, my mind was elsewhere. No, you would have an allprods file. However, you would have more than one file to upload. My guess is that you downloaded a partial contribution.You will need to download a different one that is the full package.

 

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

Sorry, I think I was a little confusing to :rolleyes:

 

I did have more than one file to upload, but only one of them was destined for root. The others were within other directories.

 

I started another thread earlier here, and thanks to the help of Bill I have managed to get some sort of sitemap to be generated. The map I am currently getting can be seen here. Now obviously this isn't quite right, but it's a start :)

Edited by SweetiesDirect
Link to comment
Share on other sites

Hi Jack,

 

Yesterday I implemented version 2.0 of dynamic sitemap on my website. The installation went smooth, but i do have a problem I can't to seem to figure out. When I look at the sitemap page, there is no content, no threestructure of some sort. It displays nothing at all, just a blank page. When I look in my admin, all the functionalities appear, like adding and excluding categories, but like said before not at the front-end, at the sitemap. What could be wrong?? I have a heavily modified shop, based on STS and the language my shop is in Dutch. Could this be the problem or maybe something else. I hope you can help me out here... Thanks in advance!

 

Rg.

Dirk

Link to comment
Share on other sites

I can't think of a reason as to why it won't work with STS but I don't use STS so I can't say for sure. You could ask in that support thread if you can't find an answer. But first try turning STS off to see if the sitemap displays. If it does, then it is something to do with STS. Also be sure the links are really not there. If you have a white background with a white font, for example, it will appear as an empty page.

 

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

I can't think of a reason as to why it won't work with STS but I don't use STS so I can't say for sure. You could ask in that support thread if you can't find an answer. But first try turning STS off to see if the sitemap displays. If it does, then it is something to do with STS. Also be sure the links are really not there. If you have a white background with a white font, for example, it will appear as an empty page.

 

Jack

 

Hi Jack,

 

Thanks for the quick reply. I saw the thread above just as I finished my comment, I will try that first. If things should appear I am happy, :rolleyes: if not then I have to look further in the forum for other people with the same problem. Hope problems get solved. Thanks again.

 

Rg.

Dirk

Link to comment
Share on other sites

Hi Jack,

 

Yesterday I implemented version 2.0 of dynamic sitemap on my website. The installation went smooth, but i do have a problem I can't to seem to figure out. When I look at the sitemap page, there is no content, no threestructure of some sort. It displays nothing at all, just a blank page. When I look in my admin, all the functionalities appear, like adding and excluding categories, but like said before not at the front-end, at the sitemap. What could be wrong?? I have a heavily modified shop, based on STS and the language my shop is in Dutch. Could this be the problem or maybe something else. I hope you can help me out here... Thanks in advance!

 

Rg.

Dirk

 

Hey Tracy,

 

You're most likely getting this blank page because you are using STS. In order to correct this, please ensure that in /catalog/dynamic_sitemap.php you do NOT have the following code commented out. If you do, please remove the // from the start of the line below.

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

 

 

Let us know if this fixes your problem

Link to comment
Share on other sites

hi have got a problem here. this message appears in admin at sitemap

 

Catchable fatal error: Object of class box could not be converted to string in

 

admin\includes\functions\html_output.php on line 281

 

any help with this error please?

Link to comment
Share on other sites

  • 2 weeks later...
hi have got a problem here. this message appears in admin at sitemap

 

Catchable fatal error: Object of class box could not be converted to string in

 

admin\includes\functions\html_output.php on line 281

 

any help with this error please?

 

i got this too, except this, all worked like a charm!

 

line 281 is

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

Complete function is

  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 ($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;
 }

Link to comment
Share on other sites

Ok, first time i checked the BUGS section of oscommerce's site and i found my problem ! :D now it works nicely so far!

 

change the

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

to

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

Edited by CraXyOW3
Link to comment
Share on other sites

  • 1 month later...
Ok, first time i checked the BUGS section of oscommerce's site and i found my problem ! :D now it works nicely so far!

 

change the

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

to

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

 

 

Thanks!! This worked like a charm!

Link to comment
Share on other sites

Thank you for looking at this. I am getting the common "unable to determine link" error; and I have the box blocked in the dynamic_sitemap.php file. The box causing the issue is ul_categories.php. Here is part of the code from dynamic_sitemap:

 

strpos($file, 'phponline') !== FALSE ||

strpos($file, 'sgem_education') !== FALSE ||

strpos($file, 'ul_categories') !== FALSE ||

strpos($file, 'tell_a_friend') !== FALSE ||

strpos($file, 'whats_new') !== FALSE )

continue;

 

I started testing it by taking the blocks off of some of the other areas and noticed that it would respond to some and not others, but I do not see a logical pattern. I know its there, I am just missing it. Hoping that you know of something to check right off the bat. If it will help you to take a look at the page it is here.

 

http://www.yalisma.com/catalog/dynamic_sitemap.php

 

Thanks in advance.

Link to comment
Share on other sites

It is usually the last one that is causing the problem (lines in your case). But it appears you are using an old version of the contribution since those strings to exclude boxes are no longer used. You might want to try upgrading since I think that problem was fixed.

 

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

It is usually the last one that is causing the problem (lines in your case). But it appears you are using an old version of the contribution since those strings to exclude boxes are no longer used. You might want to try upgrading since I think that problem was fixed.

 

Jack

 

 

Thanks for the quick reply. I installed 2.0 and it works. I am sorry to bother you on such an easy fix, I am always hesitant to use contributions modified from the original version by someone other than the developer. But in this case the new version worked perfectly. Thanks for letting me know.

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