Don’t know if there is anyone who will see this, but was wondering how to open your menu bar up top after one hits the close button? The toggle is self explanatory, but I see no settings or open button anywhere. Do I have to deactivate and reactivate to get it back every time I close?
Please advise if you could.
Thanks,
Best,
designdrumm
The following messages were saw by me, whe using the plugin:
]]>Warning Invalid argument supplied for foreach() on line 8 in file /var/www/html/restritoweb/wp-content/plugins/blackbox-debug-bar/application/debug-bar.php
Warning Invalid argument supplied for foreach() on line 63 in file /var/www/html/restritoweb/wp-content/plugins/blackbox-debug-bar/application/debug-bar.php
I have wanted to use this on a live site to help find and fix a bug, but the problem is/was it doesn’t have any role filtering so it would be publicly viewable…
So I added this hack to not run the Blackbox display output unless you are of an administrator role. Although of course it could be something that could be incorporated into the class loading in a future version (with a role filter available too, or perhaps just via the manage_options capability.)
add_action('plugins_loaded','blackbox_user_filter');
function blackbox_user_filter() {
if (!class_exists('BlackBox_Hook')) {return;}
global $current_user; $current_user = wp_get_current_user();
if (in_array('administrator', $current_user->roles)) {return;}
remove_action('admin_footer', array('BlackBox_Hook', 'footer'));
remove_action('wp_footer', array('BlackBox_Hook', 'footer'));
}
I noticed the forked Github version had an is_admin()
check to attempt solve this, but is_admin
is not what needs to be used in this case, for it totally limits the use of the Blackbox to just the admin area, crippling the plugin use. (I have done a fork and pull request on github with the same code above.)
Also, I did a style hack to moves the Debug Bar to the bottom of the screen so it doesn’t conflict with the existing WP admin bar. (Since there is a screen toggle button already, there could be another button that adds or removes these styles and thus moves it from top to bottom.) Still, defaulting to the bottom would be better because of the admin bar.
#blackbox-web-debug {bottom:0px !important; top:initial !important;}
#blackbox-web-debug .debug-panel {position: absolute; top: -410px; width:99%;}
#blackbox-profiler {top:-70px !important;}
Thanks for an awesome plugin, very handy it tracking down some particularly ghostly bugs. hmmmmmm just had an idea, a template loop trace display panel could be a good addition… ??
]]>For example I get this notice:
Notice Undefined variable: class on line 26 in file /var/www/clients/client2/web8/web/wp-content/themes/ninja/header.php
Line 26:
<body <?php body_class($class); ?>>
According to the WP codex that is correct:
https://codex.www.ads-software.com/Function_Reference/body_class#Usage
What now?
]]>Greg,
Thank you for this very useful plugin. I wanted an easy way to check WordPress constants and therefore updated the code. You can see the diff at https://github.com/michael-cannon/blackbox-debug-bar/compare/wp-mirrors:master…wp_constants.
I’ve also corrected a few issues with the readme and began updating to WordPress coding standards.
]]>Not sure if its an issue with the plugin, my plugin or wordpress itself. My plugin calls to the get_option() for each of a dynamic number of options. Not only do i know for certain it is retrieving the info and returning as the content is being loaded but i also debugged with var_dump();
Yet none of these queries are shown in the profiler. Im not sure if they are being called before or after the profiler starts/stops or what.
I did set checkpoints and those seem to show up for each query but the queryies themselves even to other options for my plugin dont show up.
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>Hello,
I just downloaded and activated your plugin but while it shows all of my SQL queries perfectly, it doesnt’t show any of the session variables I am manipulating.
The session array simply appears as:
$_SESSION = array (
);
I am manipulating about 7/8 variables and echoing them out at the top of my page. I am actually var_dump – ing them to the screen and it looks as follows:
array(2) { [“ViewType”]=> string(12) “StandardView” [“WebsiteLanguage”]=> string(7) “English” }
I thought that your plugin would also show me the current session values stored for the user accessing the page? Have I installed / configured this incorrectly?
Kind Regards
Simon
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>Hi Greg,
First off, thanks for creating such a great plugin and releasing it for free.
I use your plugin on my clients websites while the sites are in development to help me debug. However, sometimes I use your plugin on live websites in order to debug issues too.
Could you possibly look at adding a conditional statement to only display the debug bar if the user is logged in as admin? I really don’t see the point of displaying the debug bar to non-logged in users or basic ‘subscribers’.
Thanks,
Matthew
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>I just saw that the debug bar is not being displayed on the login page but the js files are being loaded:
<script type='text/javascript' src='https://domain.tld/wp-content/plugins/blackbox-debug-bar/public/highlight.pack.js'></script>
<script type='text/javascript' src='https://domain.tld/wp-content/plugins/blackbox-debug-bar/public/blackbox.js'></script>
nothing critical, just wanted to put it out there.
I am really looking forward for the new version. Thanks for your work.
]]>Have you ever considered publishing the code to GitHub?
That way (minor) contributions by users can be implemented far easier and faster. Additionally users can use/download dev versions for testing.
If I can help you with that just tell me.
Christian
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>Loving the plugin but it would be nice if I could enter an IP address in the backend so it only shows at my location.
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>Can you make an option that toggles whether BlackBox is shown at the top or the bottom of the window?
To manually change this, you have to edit the following in styles.css
#blackbox-web-debug {
top: auto;
bottom: 0;
}
#blackbox-web-debug div.debug-panel {
position: fixed;
bottom: 28px;
left: 0;
right: 0;
}
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>Hi!
again thank you for this nifty plugin that speed up our development process!
The last version pushed throws a notice from this function:
“public static function init()”
My fix below:
/**
* Initiates BlackBox plugin
*
* @return null
*/
public static function init()
{
// init profiler
add_filter("all", array("BlackBox_Hook", "profiler"));
apply_filters('debug', 'Profiler Initiaded');
apply_filters('debug', 'Profiler Noise');
// scripts and styles
add_action('init', 'BlackBox::init_scripts_styles');
add_action('admin_footer', array("BlackBox_Hook", "footer"));
add_action('wp_footer', array("BlackBox_Hook", "footer"));
set_error_handler(array("BlackBox", "errorHandler"), E_ALL | E_STRICT);
}
/**
* Initiates BlackBox scripts and styles
*
* @return null
*/
public static function init_scripts_styles()
{
// scripts and styles
wp_register_script("blackbox-js", plugins_url()."/blackbox-debug-bar/public/highlight.pack.js", array("jquery"));
wp_register_script("blackbox-highlight", plugins_url()."/blackbox-debug-bar/public/blackbox.js", array("jquery"));
wp_register_style("blackbox-css", plugins_url()."/blackbox-debug-bar/public/styles.css");
wp_enqueue_style("blackbox-css");
wp_enqueue_script("blackbox-js");
wp_enqueue_script("blackbox-highlight");
}
I believe it’s quite easy to fix and push ??
Have a good day, Laurent
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>` <?php apply_filters(“debug”, “Checkpoint name”); ?>
This would be useful to have on the plugin page somewhere. Might save someone else a bit of time to dig through the code for it or track down this blog post: https://ditio.net/2011/01/29/wordpress-debug-bar-plugin-blackbox/.
Love the plugin, by the way. It’s a really indespensible performance tool.
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>I love the plugin and find it an invaluable debugging aid but am now unable to use it due to what I believe is a javascript conflict (it’s certainly a JS issue).
Here’s what happens:
I’ve looked under the hood at the browsers debugger and I see that every time I click on the link I get the following JS error:
Uncaught TypeError: Cannot read property ‘style’ of null
The code that this points to is in the WpDebugBar’s SwitchPanel function:
switchPanel: function(open) {
for(var i in WpDebugBar.element) {
document.getElementById("blackbox-"+WpDebugBar.element[i]).style.display = "none";
Uncaught TypeError: Cannot read property 'style' of null
}
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>The plugin breaks when you have moved wp-content to another directory. Please update the plugin to use the WP_CONTENT_URL constant. This is what happens: https://cl.ly/3X002v3x2W0b2u2T1l2i
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>I’d like to use this plugin over other debug bar plugins (cause it’s awesome!) but it’s conflicting with my existing admin bar (which I actually use and like).
How do you guys get around this? I could bump it down but it would still cover menu options. Likewise if I bumped the adminbar down.
Changing the position to bottom: 0 seems to work. Is that the best thing to do?
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>Will W3c validator be added in a future release ?
]]>This plugin seems quite helpful, thank you for coding it and putting it out there.
What I would most like it to do, however, it doesn’t seem to. Namely, display the $_POST that was received before the latest page render. Firebug is showing me the POST content, but the array is always empty in the Blackbox Globals arrays list.
I wish I had more time to look at it and learn why, to help here, but I don’t and I thought someone would either know why, or would like to know.
Cheers,
Sean
]]>Hi – I like to test with all notices, warning s etc on. Thought your plugin might be a useful addition, but it is unusable if one has notices switched on in 3.1. But then at least by looking at site I saw otto’s comment and found these plugins:
Debug bar
Debug bar console
debug bar extender
On this plugin:
This repeats a lot:
Notice: Use of undefined constant E_DEPRECATED – assumed ‘E_DEPRECATED’ in C:\web\wpbeta\wp\wp-content\plugins\blackbox-debug-bar\application\BlackBox.php on line 131
Notice: Undefined index: count in C:\web\wpbeta\wp\wp-content\plugins\blackbox-debug-bar\application\BlackBox.php on line 142
A debug tool should have had these covered already.
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>Hi,
Great plugin!
I have WordPress installed in a sub-directory on my test server and the plugin was not finding its CSS and JavaScript.
To fix this I modified debug-bar.php
and changed 2 occurences of bloginfo("url")
to bloginfo("wpurl")
.
Andrew.
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>At first, great idea and plugin.
Please can you add a small check for $_SESSION to deactivate my php notices; i have all warnings anf notice on at my development client.
Many thanks
private function __construct()
{
$this->_profiler = new BlackBox_Profiler();
if ( !isset($_SESSION) )
$_SESSION = '';
$this->_globals = array(
'get' => $_GET,
'post' => $_POST,
'cookie' => $_COOKIE,
'session' => $_SESSION,
'server' => $_SERVER
);
}
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>Just wanted to say thank you for that one! Great that you share this!!
https://www.ads-software.com/extend/plugins/blackbox-debug-bar/
]]>