Zen Cart Logo
Forums / General Questions / How to debug when NO ERROR LOG file created?

How to debug when NO ERROR LOG file created?

Views: 2,778

Results 1 to 9 of 9
24 Jan 2014, 5:09 PM
#1
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

How to debug when NO ERROR LOG file created?

This may be a simple question, but so far, I am baffled.

When you click on one particular category on our website, it doesn't load any products:

http://www.mjmmagic.com/store/money-magic-tricks-c-2.html

But if you click ANY OTHER category, all the products load.

When I go to the /logs/ directory, there aren't any debug logs being created (normally they do since I already deleted a bunch of them prior to isolating this issue).

I also tried the /includes/local/configure.php option that DrByte discusses here: http://www.zen-cart.com/content.php?124-blank-page. Even that doesn't display any errors.

My first thought is that there must be SOME PRODUCT in that category which is causing the issue (perhaps in a SQL query). However, without a debug message in my LOGS folder, I have no way of knowing what the issue is.

Any ideas on how to find out the culprit?

And just to anticipate this question (did I install any add-on's recently), the answer is no. Besides, if this was an issue of an Add-On, then none of the categories should be loading up products. But as it stands, the only category that doesn't list the products is the Money Magic category above.

Help!

24 Jan 2014, 5:11 PM
#2
picaflor_azul avatar

picaflor_azul

Totally Zenned

Join Date:
Jul 2009
Location:
picaflor-azul.com
Posts:
6,940
Plugin Contributions:
28

Re: How to debug when NO ERROR LOG file created?

Jeff_Mash:

This may be a simple question, but so far, I am baffled.

When you click on one particular category on our website, it doesn't load any products:

http://www.mjmmagic.com/store/money-magic-tricks-c-2.html

But if you click ANY OTHER category, all the products load.

When I go to the /logs/ directory, there aren't any debug logs being created (normally they do since I already deleted a bunch of them prior to isolating this issue).

I also tried the /includes/local/configure.php option that DrByte discusses here: http://www.zen-cart.com/content.php?124-blank-page. Even that doesn't display any errors.

My first thought is that there must be SOME PRODUCT in that category which is causing the issue (perhaps in a SQL query). However, without a debug message in my LOGS folder, I have no way of knowing what the issue is.

Any ideas on how to find out the culprit?

And just to anticipate this question (did I install any add-on's recently), the answer is no. Besides, if this was an issue of an Add-On, then none of the categories should be loading up products. But as it stands, the only category that doesn't list the products is the Money Magic category above.

Help!

Are the permissions set on your logs folder to 777?

Thanks,

Anne

24 Jan 2014, 5:16 PM
#3
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: How to debug when NO ERROR LOG file created?

Yes.....like I said, the logs folder works fine, and always fills up with debug messages when something goes wrong. It's just this particular case that no files are being created. All other categories load fine, just not the Money Magic category. So it must be something to do with that category or the products listed within there.

I just need to figure out some way to see where the error is happening. Grrrrr!

24 Jan 2014, 5:18 PM
#4
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: How to debug when NO ERROR LOG file created?

I should also add that when you go to that problem link (http://www.mjmmagic.com/store/money-magic-tricks-c-2.html), you will notice that the last thing to load is the sorting box, which IS an add-on that allows you to sort the products by price, or popularity. My first thought was that this had something to do with it.

But again, if you go to ANY OTHER category, they all load fine. So it can't be any add-on, or else it would globally effect all the category product listings.

So I am really stuck here. Any other ideas?

24 Jan 2014, 7:29 PM
#5
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: How to debug when NO ERROR LOG file created?

The sort filter is working on that page, I can select 'most popular' and it will return the products.

The other dropdown selections do not return a value to display.

Without seeing your admin categories structure or the code that's running that page my best guess is that the category is not being referenced in the product or vise versa. Be sure the products within that category have master category id's and are linked properly. Also check their product type.

24 Jan 2014, 7:52 PM
#6
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: How to debug when NO ERROR LOG file created?

twitchtoo:

Without seeing your admin categories structure or the code that's running that page my best guess is that the category is not being referenced in the product or vise versa. Be sure the products within that category have master category id's and are linked properly. Also check their product type.

I wonder how to narrow this down though. We have over 650 products in that category alone (and another 400 more which are linked to that category with another master category id). All of their product type == '1'.

I honestly think perhaps there is ONE product or something which is causing this not to display anything.......but the question remains: if there is a query or something which is dying, why is nothing being logged in the /logs/ folder?

After all, there is SOMETHING that is causing that category not to load......and if it just dies hard like that, then how best to troubleshoot it when we have so many items?

That remains a mystery.

24 Jan 2014, 7:56 PM
#7
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: How to debug when NO ERROR LOG file created?

UPDATE: Okay, I am getting somewhere. I ran the following database query:

SELECT products_model FROM zen_products WHERE master_categories_id = '2' ORDER by products_date_added DESC

That returned to me the most recently added products. I then took the latest added product to that category, deactivated it, and now the category listing is loading just fine.

I have yet to find out WHY it's happening (or what is up with that product) but I am looking into that. I still would like to know WHY it never logged anything in the debug LOGS directory, but at least the initial problem is fixed.

THANK YOU to each and every one of you who hopped on this thread to help me out.

24 Jan 2014, 8:15 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: How to debug when NO ERROR LOG file created?

It'll only log something if a PHP error occurs.

If it's just bad data on a certain product, that doesn't necessarily trigger an error in software terms (granted, to you and me we of course consider it an error because it's not working).

Do your product names/descriptions have content in them that you copy/pasted, or imported from some other source? Maybe they've got invalid characters in them.

24 Jan 2014, 9:50 PM
#9
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: How to debug when NO ERROR LOG file created?

DrByte:

It'll only log something if a PHP error occurs.

If it's just bad data on a certain product, that doesn't necessarily trigger an error in software terms (granted, to you and me we of course consider it an error because it's not working).

Do your product names/descriptions have content in them that you copy/pasted, or imported from some other source? Maybe they've got invalid characters in them.

What happened was a particular image had a SPACE and HYPHEN in the image name. So I noticed that this particular product had an image name which looked like this: "Product - Image.jpg"

Once I deleted the image, the categories loaded up just fine.