I'm about to submit v1.0.3 to the plugins' area:
- Added missing constant to /YOUR_ADMIN/includes/languages/english/display_logs.php.
- 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.
- BUGFIX: $dir variable close/unset was in the wrong place (/YOUR_ADMIN/display_logs.php).
- BUGFIX: Needed to convert htmlentities in the loaded file to ensure that any present don't disrupt the file display.
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
Last edited by gilby; 16 Sep 2013 at 12:19 PM.
Zen cart installation / maintenance / customisation / hosting
Supported Modules: Dutch language pack, Multi site, Dynamic Price Updater and more.
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..
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Because you've never steered me wrong I just BLINDLY made this change..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???
Last edited by DivaVocals; 16 Sep 2013 at 03:57 PM.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Hmmm.. Looks like I have sort of re-invented the wheel
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.
I will probably add Torvista's code as well to show the most recent error
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
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.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
Bookmarks