Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Products missing from one category

Products missing from one category

Views: 796

Results 1 to 7 of 7
8 Jan 2013, 12:51 AM
#1
grandpastoys avatar

grandpastoys

New Zenner

Join Date:
Jul 2012
Location:
Kentucky
Posts:
38
Plugin Contributions:
0

Products missing from one category

HELP! All of a sudden today, one of my categories is showing no products. You can see the category at:
http://grandpas-toys.com/retailstore/index.php?main_page=index&cPath=73
It has worked fine until today. I have made no changes, at least that I am aware of, to cause this behavior.
How do I get them to display again?
Thanks,
Grandpa

8 Jan 2013, 1:12 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Products missing from one category

I'm not sure why your page output cuts off suddenly after the
"So, what has lead us to this decision? ...</a></td>

</tr></table> </body> </div></div> <br class="clearBoth" />

There is likely some PHP error that is causing processing to terminate. Is it possible that your host has changed something about your server environment?
Answer the "posting tips" giving full details about your Zen Cart installation and your server so we don't have to guess.
Post the latest "myDebugxxx" file from your /cache/ folder in the root of your Zen Cart (or /logs/ if you are on v1.5.1).

Aside from that, you have pasted a complete word processor document into your category description, including the <head> and <body> tags, which is a major no-no. Zen Cart already provides those, and repeating them will cause issues (though browsers may be smart enough to understand and bypass the erroneous tags).

8 Jan 2013, 1:30 AM
#3
grandpastoys avatar

grandpastoys

New Zenner

Join Date:
Jul 2012
Location:
Kentucky
Posts:
38
Plugin Contributions:
0

Re: Products missing from one category

gjh42:

I'm not sure why your page output cuts off suddenly after the
"So, what has lead us to this decision? ...</a></td>

</tr></table> </body> </div></div> <br class="clearBoth" />

There is likely some PHP error that is causing processing to terminate. Is it possible that your host has changed something about your server environment?
Answer the "posting tips" giving full details about your Zen Cart installation and your server so we don't have to guess.
Post the latest "myDebugxxx" file from your /cache/ folder in the root of your Zen Cart (or /logs/ if you are on v1.5.1).

Aside from that, you have pasted a complete word processor document into your category description, including the <head> and <body> tags, which is a major no-no. Zen Cart already provides those, and repeating them will cause issues (though browsers may be smart enough to understand and bypass the erroneous tags).

Thanks so much for your speedy reply and your willingness to help. I stripped out all the html, to see if that was the problem. It did not help.
My ZC is 1.5.1 It has been working great except for this new problem. You can see that the products are showing okay in the other categories.

Here are some of the last debug logs:
PHP Warning: Division by zero in /hsphere/xxxxxxx/xxxxxx/xxxxxx/xxxxxx/xxxxxx/xxxxxx/includes/modules/category_product_listing.php on line 290
PHP Warning: Division by zero in /hsphere/xxxxxx/xxxxxx/xxxxxx/xxxxxx/xxxxxx/xxxxxx/includes/functions/general.php on line 3249

Hope this tells you something. It is above my expertise.
Thanks,
Grandpa

8 Jan 2013, 1:39 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Products missing from one category

/includes/modules/category_product_listing.php does not exist in my v1.5.1 test site. Have you installed a mod that uses this file?

Also, /includes/functions/functions_general.php has only 1554 lines, so I don't know what line your error could be referring to (even if you used an inappropriate text editor that doubled the line spacing - a common occurrence with editors not designed for code files).

8 Jan 2013, 3:56 AM
#5
grandpastoys avatar

grandpastoys

New Zenner

Join Date:
Jul 2012
Location:
Kentucky
Posts:
38
Plugin Contributions:
0

Re: Products missing from one category

gjh42:

/includes/modules/category_product_listing.php does not exist in my v1.5.1 test site. Have you installed a mod that uses this file?

Also, /includes/functions/functions_general.php has only 1554 lines, so I don't know what line your error could be referring to (even if you used an inappropriate text editor that doubled the line spacing - a common occurrence with editors not designed for code files).

The mod that may be using this file could be Image Handler. I do have it installed, but it appears to work fine on all other category pages.

The lines starting at 290 in category_product_listing.php are:

$_GET['page'] = round((($check_count/MAX_DISPLAY_RESULTS_CATEGORIES)+(fmod_round($check_count,MAX_DISPLAY_RESULTS_CATEGORIES) !=0 ? .5 : 0)),0);
$page = $_GET['page'];
if ($old_page != $_GET['page']) {
// zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&pID=' . $_GET['pID'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')));
}

Also, there is no functions_general.php file in the functions folder. It is functions/general.php. I will look into that file as well.

Thanks for your help. Please do not give up on me.

8 Jan 2013, 6:41 AM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: Products missing from one category

($check_count/MAX_DISPLAY_RESULTS_CATEGORIES)
```This is the only division in the posted code, so MAX_DISPLAY_RESULTS_CATEGORIES is presumably evaluating to 0 here. The constant is supposed to be set in Configuration > Maximum Values:> Lookup CONSTANT Definitions
> Key: 	MAX_DISPLAY_RESULTS_CATEGORIES
> Title: 	Maximum Categories Products Display List
> Description: 	Number of products to list per screen
> Value: 	10
> Group: 	ID#3 Maximum Values(from my test site)
8 Jan 2013, 3:14 PM
#7
grandpastoys avatar

grandpastoys

New Zenner

Join Date:
Jul 2012
Location:
Kentucky
Posts:
38
Plugin Contributions:
0

Re: Products missing from one category

Problem Solved! I noticed that the problem occurred right after I had added a new product to this category. I deleted the product and voila the category was back in all its glory with all its products. So, after troubleshooting the new product listing, I located what was causing it to break the category. I normally reduce the size of the product image before uploading. In this case, I had forgotten to. Its size was 4320 x 3240. After resizing it to 1280 x 960 and uploading this image instead of the larger one, it corrected the problem. I do not understand why, but I guess it really doesn't matter.
Thanks for your help,
Grandpa