Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 1 votes

Dynamic SiteMap


838 replies to this topic

#41 Top_Speed

  • Community Member
  • 357 posts
  • Real Name:KJ Miller
  • Location:SU-ville (Syracuse)

Posted 04 August 2005, 15:15

Jack_mcs, on Aug 4 2005, 11:02 AM, said:

The bullet without a link is probably because it can't deteermine the proper link from the given information. If you are getting an error at the bottom of the window, then this is the reason. Otherwise, I can't say without seeing the code.

<{POST_SNAPBACK}>


Thanks for the fast response! great support Jack. What code are you talking about (above) so I can post it, I have no error on the bottom of the page: My Sitemap here

~KJ
define('PROJECTS', 'Something that goes on forever!');

#42 Jack_mcs

  • Community Member
  • 24,072 posts
  • Real Name:Jack
  • Gender:Male

Posted 04 August 2005, 16:35

I don't know which section of code it might be. That would depend on your site and where it is failing at. The map either displays links it creates from the files in your root directory or from infoboxes. If that missing link is a file in your root directory, then compare the files you have there with the ones shown on the page and you should be able to figure out which it is.

Jack

#43 keress

  • Community Member
  • 157 posts
  • Real Name:Linda Carter

Posted 07 August 2005, 17:28

I've just installed the contribution and I'm getting the following error message

Quote

1054 - Unknown column 'c.categories_status' in 'where clause'

select c.categories_id, cd.categories_name, c.parent_id from categories c, categories_description cd where c.categories_status = '1' and c.categories_id = cd.categories_id and cd.language_id = '1' order by c.parent_id, c.sort_order, cd.categories_name

[TEP STOP]

I see that this is in reference to the enable/disable categories module (which I'm unfamiliar with). I've tried switching to the second option in the "category_tree.php" file. I've tried commenting out both lines, but still get error messages. I've tried enabling the "Display Category/Manufacturer Filter (0=disable; 1=enable)" option in config and changing the lines in the "category_tree.php" file, but still the same error message.

What should I try next?

Thanks much

#44 Jack_mcs

  • Community Member
  • 24,072 posts
  • Real Name:Jack
  • Gender:Male

Posted 07 August 2005, 17:57

That code comes from version 1.4. Since that is not part of the standard code, it should not have been uploaded as a new version. Try downloading version V 1.3.

Jack

#45 nicedeals

  • Community Member
  • 97 posts
  • Real Name:NiceDeals
  • Location:West Yorkshire, England

Posted 11 August 2005, 16:16

Hi,
i installed the 1.4 version and then 1.3 on top as Jack said...I've got teh site map showing but also these lines on top;

Invalid code for this module found in the following infobox: Heading
Invalid code for this module found in the following infobox:
Invalid code for this module found in the following infobox:
Invalid code for this module found in the following infobox:

my sitemap page link is as follows;
http://nicedeals.co.uk/caraccessories/nfos...308bef13a70e58b

one otehr thing, will the search engine pick it up automatically now or do need to submit it?
thanks!

#46 Jack_mcs

  • Community Member
  • 24,072 posts
  • Real Name:Jack
  • Gender:Male

Posted 12 August 2005, 03:34

It's wokring then. It is just finding code it doesn't understand. You will need to do some detective work to isolate which infobox is causing the problem and then add it to the exclude list in modules/dynamic_sitemap.php. The easiest way to do this is by removing the box(ex) from includes.boxes/. If your box is required you can't do this, but most add-on boxes are optional.

Jack

#47 nicedeals

  • Community Member
  • 97 posts
  • Real Name:NiceDeals
  • Location:West Yorkshire, England

Posted 12 August 2005, 07:36

I wouldn't know where to start;

my dynamic_sitemap.php looks like this;

<?php
/*
$Id: dynamic_sitemap.php,v 1.0 2005/06/29
written by Jack_mcs at www.osocmmerce-solution.com

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

Copyright © 2003 osCommerce

Released under the GNU General Public License
*/
require DIR_WS_FUNCTIONS . 'dynamic_sitemap.php';

$path = DIR_WS_BOXES;
$pathFileName = DIR_WS_INCLUDES . 'filenames.php';
$pathLanguage = DIR_WS_LANGUAGES . $language . '.php';
$boxText = array();

/********************* Find the infoboxes to add ***********************/
if ($handle = opendir($path))
{
$found = false;
$ctr = 0;
while (false !== ($file = readdir($handle)))
{
if (substr($file, -4, 4) !== ".php")
continue;
else if (strpos($file, 'best_sellers') !== FALSE || //ignore these since
strpos($file, 'categories') !== FALSE || //they don't use a
strpos($file, 'currencies') !== FALSE || //standard format
strpos($file, 'languages') !== FALSE ||
strpos($file, 'manufacturer_info') !== FALSE ||
strpos($file, 'manufacturer') !== FALSE ||
strpos($file, 'order_history') !== FALSE ||
strpos($file, 'product_notifications') !== FALSE ||
strpos($file, 'reviews') !== FALSE ||
strpos($file, 'search') !== FALSE ||
strpos($file, 'shopping_cart') !== FALSE ||
strpos($file, 'specials') !== FALSE ||
strpos($file, 'tell_a_friend') !== FALSE ||
strpos($file, 'Account') !== FALSE ||
strpos($file, 'whats_new') !== FALSE )
continue;

$file = $path . '/' . $file;
$fp = file($file);

for ($idx = 0; $idx < count($fp); ++$idx)
{
if ($posStart = strpos($fp[$idx], "BOX_HEADING") !== FALSE)
{
$parts = explode(" ", $fp[$idx]);
for ($i = 0; $i < count($parts); ++$i)
{
if (strpos($parts[$i], "BOX_HEADING") === FALSE)
continue;
$parts = explode(")", $parts[$i]); //$parts has full box heading text
$name = explode("_", $parts[0]); //ignore the BOX_HEADING part
for ($x = 3; $x < count($name); ++$x) //name may be more than one word
{
if (tep_not_null($name[$x]))
$name[2] .= ' ' . $name[$x];
}
$name[2] = strtolower($name[2]);
$name[2] = ucfirst($name[2]);
$boxHeading[$ctr]['heading'][$ctr] = $name[2];
}
}
else if ($posStart = strpos($fp[$idx], "FILENAME") !== FALSE)
{
$str = str_replace("'<a href=\"' . tep_href_link(", "", $fp[$idx]);
$str = str_replace("\$info_box_contents[] = array('text' => ", "", $str);

$parts = explode(")", $str);
$parts[0] = trim($parts[0]);

$boxParts = explode(".", $parts[1]);
$boxParts[2] = trim($boxParts[2]);

if (tep_not_null($boxParts[2]))
{
$boxHeading[$ctr]['filename'][] = getFileName($pathFileName, $parts[0]);
$boxHeading[$ctr]['boxtext'][] = getBoxText($pathLanguage, $boxParts[2]);
}
else
{
echo 'Invalid code for this module found in the following infobox: '.$boxHeading[$ctr]['heading'][$ctr].'<br>';
array_pop($boxHeading);
$ctr--;
}
}
}
$ctr++;
}
closedir($handle);
}

/********************* Find the pages to add ***********************/
$ctr = 0;
($dir = opendir('.')) || die("Failed to open dir");
$files = array();
while(false !== ($file = readdir($dir)))
{
if(! is_dir($file) && substr($file, -4, 4) === ".php") //only look at php files
{
$engFile = DIR_WS_LANGUAGES . $language . '/' . $file;
if (file_exists($engFile) && IsViewable($file))
{
if (strpos($file, "product_info.php") !== FALSE ||
strpos($file, "create_account_success.php") !== FALSE ||
strpos($file, "links_submit_success.php") !== FALSE ||
strpos($file, "checkout_process.php") !== FALSE )
continue;

$files['path'][] = $file;
$name = explode(".php", $file);
$files['name'][] = ucfirst($name[0]);
}
}
}
?>

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

I have no idea what code to look for and what to adjust to correct my site map page ( link attached )

http://nicedeals.co.uk/caraccessories/nfos...mic_sitemap.php

#48 Jack_mcs

  • Community Member
  • 24,072 posts
  • Real Name:Jack
  • Gender:Male

Posted 12 August 2005, 13:39

It's not the sitemap code that is causing the problem. It is one of your infoboxes that is confusing. You need to prevent it from displaying that box. Here's another, albeit longer, approach. In the file you posted, duplicate this line:
strpos($file, 'languages') !== FALSE ||
and change languages to the name of of one of your infoboxes. Save and test the site map. If it works, then that infobox is at fault. If not, then dusplicate it again and enter your next inforbox. Check and continue. Eventually, you will find the box that is at fault.

Jack

#49 nicedeals

  • Community Member
  • 97 posts
  • Real Name:NiceDeals
  • Location:West Yorkshire, England

Posted 12 August 2005, 18:55

i just ended up getting rod of some code that gets displayed when there is a problem;

$file = $path . '/' . $file;
$fp = file($file);

for ($idx = 0; $idx < count($fp); ++$idx)
{
if ($posStart = strpos($fp[$idx], "BOX_HEADING") !== FALSE)
{
$parts = explode(" ", $fp[$idx]);
for ($i = 0; $i < count($parts); ++$i)
{
if (strpos($parts[$i], "BOX_HEADING") === FALSE)
continue;
$parts = explode(")", $parts[$i]); //$parts has full box heading text
$name = explode("_", $parts[0]); //ignore the BOX_HEADING part
for ($x = 3; $x < count($name); ++$x) //name may be more than one word
{
if (tep_not_null($name[$x]))
$name[2] .= ' ' . $name[$x];
}
$name[2] = strtolower($name[2]);
$name[2] = ucfirst($name[2]);
$boxHeading[$ctr]['heading'][$ctr] = $name[2];
}
}
else if ($posStart = strpos($fp[$idx], "FILENAME") !== FALSE)
{
$str = str_replace("'<a href=\"' . tep_href_link(", "", $fp[$idx]);
$str = str_replace("\$info_box_contents[] = array('text' => ", "", $str);

$parts = explode(")", $str);
$parts[0] = trim($parts[0]);

$boxParts = explode(".", $parts[1]);
$boxParts[2] = trim($boxParts[2]);

if (tep_not_null($boxParts[2]))
{
$boxHeading[$ctr]['filename'][] = getFileName($pathFileName, $parts[0]);
$boxHeading[$ctr]['boxtext'][] = getBoxText($pathLanguage, $boxParts[2]);
}
else
{
echo ''.$boxHeading[$ctr][''][$ctr].'';
array_pop($boxHeading);
$ctr--;
}
}
}
$ctr++;
}
closedir($handle);
}
------------------------------------------------
can this hurt my site map in any way?
also..do i need to submit the site map now to search engines??

#50 Jack_mcs

  • Community Member
  • 24,072 posts
  • Real Name:Jack
  • Gender:Male

Posted 12 August 2005, 23:42

Removing parts of code prevents the contribution from doing its job. You don't submist anything to google with this contribution. It is just a sitemap that goodle will search when it goes through your site.

Jack

#51 lee246

  • Community Member
  • 189 posts
  • Real Name:Lee

Posted 16 August 2005, 18:34

Hi, i installed this contribution and get the following error on the sitemap page on my website:

1054 - Unknown column 'c.categories_status' in 'where clause'

select c.categories_id, cd.categories_name, c.parent_id from categories c, categories_description cd where c.categories_status = '1' and c.categories_id = cd.categories_id and cd.language_id = '1' order by c.parent_id, c.sort_order, cd.categories_name

[TEP STOP]

Anyone have any ideas?

#52 lee246

  • Community Member
  • 189 posts
  • Real Name:Lee

Posted 16 August 2005, 19:31

ignore the above, found the solution.

#53 keress

  • Community Member
  • 157 posts
  • Real Name:Linda Carter

Posted 18 August 2005, 13:31

I have installed this contribution and am getting the following error message:

Quote

1054 - Unknown column 'c.categories_status' in 'where clause'

select c.categories_id, cd.categories_name, c.parent_id from categories c, categories_description cd where c.categories_status = '1' and c.categories_id = cd.categories_id and cd.language_id = '1' order by c.parent_id, c.sort_order, cd.categories_name

[TEP STOP]

Any help would be greatly appreciated.

Edited by keress, 18 August 2005, 13:32.


#54 lee246

  • Community Member
  • 189 posts
  • Real Name:Lee

Posted 18 August 2005, 15:09

keress, on Aug 18 2005, 01:31 PM, said:

I have installed this contribution and am getting the following error message:
Any help would be greatly appreciated.

<{POST_SNAPBACK}>

Hi, as Jack has stated above, this comes from installing v1.4, install v1.3 instead and you will have no problems. Thats how I solved my problem.

#55 keress

  • Community Member
  • 157 posts
  • Real Name:Linda Carter

Posted 18 August 2005, 17:38

Thanks!

#56 Feydakin

  • Community Member
  • 4 posts
  • Real Name:Steve Gerencser

Posted 19 August 2005, 03:11

I just installed v1.4 and I get this error when I click on the Sitemap link

1054 - Unknown column 'c.categories_status' in 'where clause'

select c.categories_id, cd.categories_name, c.parent_id from categories c, categories_description cd where c.categories_status = '1' and c.categories_id = cd.categories_id and cd.language_id = '1' order by c.parent_id, c.sort_order, cd.categories_name

Any idea where to even start with this?

#57 Jack_mcs

  • Community Member
  • 24,072 posts
  • Real Name:Jack
  • Gender:Male

Posted 19 August 2005, 03:49

:) Try a few posts up.

Jack

#58 Feydakin

  • Community Member
  • 4 posts
  • Real Name:Steve Gerencser

Posted 19 August 2005, 03:53

Jack_mcs, on Aug 18 2005, 10:49 PM, said:

:) Try a few posts up.

Jack

<{POST_SNAPBACK}>


Yeah, never mind me.. Way too much work and not enough caffiene.. I never noticed there was a page 3 :P

Thanks -

#59 keress

  • Community Member
  • 157 posts
  • Real Name:Linda Carter

Posted 20 August 2005, 16:57

I'm getting the "Unable to determine the page link!" and having trouble understanding this reply:

Quote

Some of the infoboxes should not be added to the sitemap and are automatically excluded by the code. But I built this on a standard shop so it cannot account for each setup. I have uploaded a changed version. Just copy the includes/modules/dynamic_sitemap.php file to your site. It will still fail but should give an error message at the top of the window indicating which infobox is causing the problem. You will then need to add that to the list of known boxes in that same file. That should eliminate the errors.

Are you saying this error message comes from it not being able to find an infobox listed somewhere? And where is this dynamic_sitemap.php you're referring to?

Also, I thought this contribution would also list all the product page in each category. Was I mistaken?

#60 Jack_mcs

  • Community Member
  • 24,072 posts
  • Real Name:Jack
  • Gender:Male

Posted 20 August 2005, 18:42

No, it can find the infobox but cannot understand the format of the code used in that box. You need to add it to the excluded list in includes/modules/dynamic_sitemap.php.

Sitemaps don't generally list product pages. If you want a product listing, you should install All Products.

Jack