Zen Cart Logo
Forums / Addon Admin Tools / Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

Views: 22,768

Results 21 to 40 of 95
29 Mar 2013, 2:38 PM
#21
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

Design75:

I have added the debug-file file-size to the listing of the debug file. I find this very handy in finding potentially the same errors. If anyone else is interested, I will upload this "upgraded version"
Sounds great, Design75!

29 Mar 2013, 3:25 PM
#22
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

BTW here is a screen-shotAttachment 12254

29 Mar 2013, 4:48 PM
#23
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

Design75:

I have added the debug-file file-size to the listing of the debug file. I find this very handy in finding potentially the same errors. If anyone else is interested, I will upload this "upgraded version"

great addition!

29 Mar 2013, 8:41 PM
#24
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

The update has been submitted. There are only three lines of code added to "/YOUR_ADMIN/display_logs.php". They are clearly marked with a comment.

11 Sep 2013, 10:46 PM
#25
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

zc1.51
display log files v1.02

has anyone encounter this problem? The display log files heading displays "TABLE_HEADING_FILESIZE" instead of "Files Size" word. I know this is labeling problem but I don't know how to fix it. Can anyne help me?

12 Sep 2013, 2:56 AM
#26
drbyte avatar

drbyte

Sensei

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

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

That's a classic symptom of a corresponding language file being missing from the server.

12 Sep 2013, 5:12 AM
#27
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

where do I look for this file?

12 Sep 2013, 6:44 AM
#28
drbyte avatar

drbyte

Sensei

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

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

Here's what I would do:

Based on how 99% of plugins are prepared (ie: matching the ZC folder structure pattern), there is a main module file in the /admin/ folder, and there is a corresponding language file in the /admin/includes/languages/english/ folder. So that's the first place to look.

Or, just as with any plugin that doesn't work correctly for some unexplained reason, I'd start by looking at the files that come with the plugin and make sure I've got them on my server.

And, if I've recently installed an update to a plugin, maybe I missed installing updated versions of all the files that come with that plugin.

Or, maybe the plugin author made a mistake and left out a necessary constant/define when they put together their latest update. You can help them become aware of the specific problem by investigating to find whether the TABLE_HEADING_FILESIZE constant is missing from the language file. You can do that by looking at the file itself. Perhaps it's there but maybe they misspelled it? Or you might find it using the Developers Toolkit ... and that would reveal if it's "there" but maybe you uploaded it to someplace other than where it belongs.

12 Sep 2013, 11:35 AM
#29
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

DrByte:

Or, maybe the plugin author made a mistake and left out a necessary constant/define when they put together their latest update.
Exactly! The last update was missing that define. You'll need to edit /YOUR_ADMIN/includes/languages/english/display_logs.php and add the line that I've highlighted in red:

define('TABLE_HEADING_FILENAME', 'File Name');
define('TABLE_HEADING_MODIFIED', 'Date Modified');
define('TABLE_HEADING_FILESIZE', 'File Size (bytes)');  /*v1.0.3a*/
define('TABLE_HEADING_DELETE', 'Delete?');
define('TABLE_HEADING_ACTION', 'Action');
12 Sep 2013, 1:32 PM
#30
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

DrByte:

Here's what I would do:

Based on how 99% of plugins are prepared (ie: matching the ZC folder structure pattern), there is a main module file in the /admin/ folder, and there is a corresponding language file in the /admin/includes/languages/english/ folder. So that's the first place to look.

Or, just as with any plugin that doesn't work correctly for some unexplained reason, I'd start by looking at the files that come with the plugin and make sure I've got them on my server.

And, if I've recently installed an update to a plugin, maybe I missed installing updated versions of all the files that come with that plugin.

Or, maybe the plugin author made a mistake and left out a necessary constant/define when they put together their latest update. You can help them become aware of the specific problem by investigating to find whether the TABLE_HEADING_FILESIZE constant is missing from the language file. You can do that by looking at the file itself. Perhaps it's there but maybe they misspelled it? Or you might find it using the Developers Toolkit ... and that would reveal if it's "there" but maybe you uploaded it to someplace other than where it belongs.

I will do that Dr Byte and report back if I find the error and able to fix it. If not I will report back too. Thanks so much.

12 Sep 2013, 1:40 PM
#31
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

lat9:

Exactly! The last update was missing that define. You'll need to edit /YOUR_ADMIN/includes/languages/english/display_logs.php and add the line that I've highlighted in red:

define('TABLE_HEADING_FILENAME', 'File Name');
define('TABLE_HEADING_MODIFIED', 'Date Modified');
define('TABLE_HEADING_FILESIZE', 'File Size (bytes)'); /v1.0.3a/
define('TABLE_HEADING_DELETE', 'Delete?');
define('TABLE_HEADING_ACTION', 'Action');


Thank you very much.  I found the file mentioned and inserted the code highlighted in red in Line 27 of that file and it fixed the problem.  Many Thanks to you and the rest of the community as well. :clap:
12 Sep 2013, 4:55 PM
#32
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

I'm about to submit v1.0.3 to the plugins' area:

  1. Added missing constant to /YOUR_ADMIN/includes/languages/english/display_logs.php.
  2. Modifications to /YOUR_ADMIN/display_logs.php to account for large files. The notifier_trace.log file, for instance, can grow to be enormous if not flushed periodically.
  3. BUGFIX: $dir variable close/unset was in the wrong place (/YOUR_ADMIN/display_logs.php).
  4. BUGFIX: Needed to convert htmlentities in the loaded file to ensure that any present don't disrupt the file display.
16 Sep 2013, 11:16 AM
#33
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

I like the convenience of this mod.
But most times I don't check for errors until I know I have one, eg: blank screen
So I have added a warning to the admin that notifies you if any log files exist.

Quick and dirty file attached,
It does need work to extract the language file parts and tidy up, but you will get the idea.

It is a copy of
YOUR_ADMIN\includes\init_includes\init_errors.php
that has a check for log files added.

Place it in the overrides directory
YOUR_ADMIN\includes\init_includes\overrides\init_errors.php

YES you can override some admin files!!
nb: This is for zen v1.5.1

16 Sep 2013, 1:46 PM
#34
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

lat9:

I'm about to submit v1.0.3 to the plugins' area:

  1. Added missing constant to /YOUR_ADMIN/includes/languages/english/display_logs.php.

:blush: Sorry for that, I never noticed it was missing. Must have added it somewhere else on my own system.

16 Sep 2013, 2:51 PM
#35
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

How did I miss this handy little gem!!!??? Thanks lat9 and all for this.. I use a similar plugin for WordPress for debugging/error checking.. I have always wished something similar was available for Zen Cart..

16 Sep 2013, 2:53 PM
#36
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

gilby:

I like the convenience of this mod.
But most times I don't check for errors until I know I have one, eg: blank screen
So I have added a warning to the admin that notifies you if any log files exist.

Quick and dirty file attached,
It does need work to extract the language file parts and tidy up, but you will get the idea.

It is a copy of
YOUR_ADMIN\includes\init_includes\init_errors.php
that has a check for log files added.

Place it in the overrides directory
YOUR_ADMIN\includes\init_includes\overrides\init_errors.php

YES you can override some admin files!!
nb: This is for zen v1.5.1

Because you've never steered me wrong I just BLINDLY made this change.. :laugh: However, this seems very similar to the code Torvista posted earlier in this thread.. If I am understanding this correctly, Torvista's code displays the error log directly in the message stack, and your code simply notifies the shopowner that an error log exists.. Am I correct???

16 Sep 2013, 11:33 PM
#37
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

DivaVocals:

However, this seems very similar to the code Torvista posted earlier in this thread.. If I am understanding this correctly, Torvista's code displays the error log directly in the message stack, and your code simply notifies the shopowner that an error log exists.. Am I correct???Hmmm.. Looks like I have sort of re-invented the wheel :blush:
I should have read the entire thread, seems I was in a hurry.
Mine simply shows how many log files there are as an admin message stack warning.
Torvista's shows the messages there instead. :smile:

I will probably add Torvista's code as well to show the most recent error

17 Sep 2013, 12:43 AM
#38
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

gilby:

Hmmm.. Looks like I have sort of re-invented the wheel :blush:
I should have read the entire thread, seems I was in a hurry.
Mine simply shows how many log files there are as an admin message stack warning.
Torvista's shows the messages there instead. :smile:

I will probably add Torvista's code as well to show the most recent errorThanks for confirming.. I like Torvista's code, but given that this add-on shows the error log, I'm gonna keep just your code to inform me when there is an error log to see.. I don't think I need to see it twice..

17 Sep 2013, 7:31 AM
#39
torvista avatar

torvista

Totally Zenned

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

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

This functionality (showing the existence of debug logs in the admin message stack) is included in 1.6, why not copy it from there and avoid an unnecessary upgrade merge.

17 Sep 2013, 11:04 AM
#40
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

v1.0.3 is now available in the Plugins ...