jka Posted November 22, 2017 Share Posted November 22, 2017 BSmither et-all, We are trying to trouble-shoot a newly added plugin. We verified ... 1. the plugin is enabled 2. the hooks are enabled. 3. the db table also show the hooks_name set to '1' However the hooks functionality is not working. Any guidance to debug the hook whether it is loading and add debug messages? This is in the admin/product screen. Thanks. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 22, 2017 Share Posted November 22, 2017 Is the error_log being created? Who are 'we'? Any further assistance may require direct access to the code. Quote Link to comment Share on other sites More sharing options...
jka Posted November 22, 2017 Author Share Posted November 22, 2017 Hello BSmither, There is nothing in the error_log. 'We' refers to the developers at SFWS. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 22, 2017 Share Posted November 22, 2017 (edited) There are a few approaches to getting debug/diagnostic data: 1. Add the following statement whenever you need to see the value of a passable-by-reference variable: $GLOBALS['debug']->debugTail($variable_to_examine, 'key'); where the key could be something like: 'orders.index.inc.php_510' This will show as a heading in CubeCart's debug section of the page. 2. Add the following statement whenever you need a phrase to be seen: $GLOBALS['debug']->debugMessage("Just entered the hook: " . $hook); In the debug section of the page, there will be Messages listed near the bottom. 3. I have developed my own diagnostics module. It allows for program code tracing. Edited November 22, 2017 by bsmither Spelling Quote Link to comment Share on other sites More sharing options...
jka Posted November 22, 2017 Author Share Posted November 22, 2017 So I added GLOBALS['debug']->debugMessage('The HOOK_TAB '.' '.$GLOBALS['hook_tab_content'].'.'); under products.index.inc.php This is the result .. It just returns Array Debug Messages:[0] The HOOK_TAB Array. Quote Link to comment Share on other sites More sharing options...
jka Posted November 23, 2017 Author Share Posted November 23, 2017 Thanks to BSmither, we found the issue with the Admin module. Went ahead and re-uploaded the admin files. Seems like the upgrade via the admin front end didnt fully update the admin files. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.