Zen Cart Logo
Forums / General Questions / Strange Bug with Category cPath link

Strange Bug with Category cPath link

Locked

Views: 1,131

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
3 Dec 2010, 2:52 PM
#1
kaylala avatar

kaylala

New Zenner

Join Date:
Apr 2006
Location:
Baltimore
Posts:
41
Plugin Contributions:
0

Strange Bug with Category cPath link

I just noticed this... from an item page on my site, the Category Title links to a blank/broken page that ends with "cPath="

Step by step:
Go to a product such as:
http://www.kaylala.com/index.php?main_page=product_info&products_id=33

then click on the category "Face" just above the product image

and you'll get this lovely page:
http://www.kaylala.com/index.php?main_page=index&cPath=

Obviously, the big carousel is being pulled from the AlgoZone template that I'm using, but I'm almost certain that this was a recent problem after updating Zen Cart to 1.3.9h (I had been in the 1.3.9 range for sometime without problems)

I could be completely wrong, but I'm almost positive this is a recent bug.

Any thoughts on how to fix it?

3 Dec 2010, 4:21 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Strange Bug with Category cPath link

The template code is heavily modified, so I would compare the tpl_product_info_display.php code with the code in the /template_default/ version of the file to see if there is any difference in the category icon part.

Then I would check if there are any files involved in that part of the page listed in recent ZC changelogs.

3 Dec 2010, 4:50 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Strange Bug with Category cPath link

Edit the file:
/includes/modules/category_icon_display.php

and change the code from:

if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}
if ($cPath == '') {
  $cPath= zen_get_product_path((int)$_GET['products_id']);
}
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}
if ($cPath == '' || $cPath == 0) {
  $cPath= zen_get_product_path((int)$_GET['products_id']);
}
if (!isset($_GET['cPath']) || $_GET['cPath'] == '') $_GET['cPath'] = $cPath;

$cPath_new = zen_get_path(zen_get_products_category_id((int)$_GET['products_id']));
3 Dec 2010, 5:41 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Strange Bug with Category cPath link

That has been that way a long time (v1.3.9h copy)

  • @version $Id: category_icon_display.php 6104 2007-04-01 14:54:40Z ajeh $

Odd that nobody has mentioned it before. Maybe that indicates how often that link is used:)
Or how rare the specific trigger is.

3 Dec 2010, 5:53 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Strange Bug with Category cPath link

The product listing code in your template appears to have been pretty much completely reworked by Algozone, and all links to product info pages look like

[yoursite]/index.php?main_page=product_info&products_id=40

where the stock template looks like

[yoursite]/index.php?main_page=product_info&cPath=21&products_id=28

3 Dec 2010, 6:09 PM
#6
kaylala avatar

kaylala

New Zenner

Join Date:
Apr 2006
Location:
Baltimore
Posts:
41
Plugin Contributions:
0

Re: Strange Bug with Category cPath link

Ahhh... I see... wow, you both just saved me hours of headache by helping to identify the problem! Thanks!

3 Dec 2010, 6:12 PM
#7
kaylala avatar

kaylala

New Zenner

Join Date:
Apr 2006
Location:
Baltimore
Posts:
41
Plugin Contributions:
0

Re: Strange Bug with Category cPath link

BTW, Glenn, are you enjoying the snow you guys are getting up there??

3 Dec 2010, 6:13 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Strange Bug with Category cPath link

I would suggest you ask Algozone to fix this problem, as it is definitely a functional bug in their template.

No snow here today - we've had bits previously, but not much. My girlfriend lives an hour northeast of me and has had 3" of snow a couple of times.

4 Dec 2010, 3:40 AM
#9
kaylala avatar

kaylala

New Zenner

Join Date:
Apr 2006
Location:
Baltimore
Posts:
41
Plugin Contributions:
0

Re: Strange Bug with Category cPath link

I'm actually going to get rid of the AlgoZone template altogether, this is not the first problem I've had (enabling Reviews broke the formatting too). I've just downloaded a ZenFlavor template, which appears to be a lot more compliant with the core functions of Zen Cart and isn't nearly as expensive as the AlgoZone template was... I'll chalk up my use of AlgoZone as a learning experience.