Zen Cart Logo
Forums / Features Wish List / Snapshot of who's online when a debug is created

Snapshot of who's online when a debug is created

Views: 38

Results 1 to 5 of 5
26 Jan 2012, 6:21 PM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Snapshot of who's online when a debug is created

This week I have been intermittently struggling to find the cause of a debug error in my just-upgraded 1.5 shop (
[24-Jan-2012 15:40:51] PHP Fatal error: 1109:Unknown table 'p' in field list :: select count(p.products_id) as total in /home/xxxx/public_html/tienda/includes/classes/db/mysql/query_factory.php on line 101).

I would get several of these a day but despite trying all the front and back end pages I just could not find the source or trigger the error.

I have hacked the admin a bit so that when a debug log exists/is created I see a reference to the logfile at the top of the admin page (good idea I think!!).

So, I was in the admin when a new logfile was created so I immediately checked Whos Online and what pages they were looking at and found that the error was coming from a long-ago-customised-but-never-used products_all page.

This is not normally accessible from any links in my site hence I had not triggered it in my checks. Not sure how people got there, but that’s by the by.

My suggestion is that when a debug log is created, a (optional) snapshot of whos online could be created to aid debugging these intermittent problems.

26 Jan 2012, 6:27 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Snapshot of who's online when a debug is created

Have you tried a search in the Tools ... Developers Tool Kit ... in the bottom input box for:
count(p.products_id)

26 Jan 2012, 6:39 PM
#3
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Snapshot of who's online when a debug is created

Have you tried a search in the Tools ... Developers Tool Kit ... in the bottom input box for:
count(p.products_id)It didn't find anything, but I have fixed the issue.

I considered it sheer luck I saw the error creation in real-time and so could see the page in use, hence this wish item!

I guess one could extract the whos online code to a new function called by the debug log creation function, but I can't justify the days it would take me to do it!

26 Jan 2012, 6:45 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Snapshot of who's online when a debug is created

Thanks for the update that you were able to fix this ... :smile:

26 Jan 2012, 6:45 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Snapshot of who's online when a debug is created

torvista:

but I can't justify the days it would take me to do it!That's the same reason why many fleeting "suggestions" end up near the bottom of the list.