• Fatal error: Cannot declare class Debug_Bar, because the name is already in use in /s4-testforplugins/wordpress/wp-content/plugins/debug-bar/debug-bar.php on line 20

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dion Hulse

    (@dd32)

    Meta Developer

    Hi @bayejid00,

    I’m unable to duplicate this using the latest Query Monitor and Debug bar.

    The error you’ve shared suggests that there might be something else in your environment loading Debug Bar, possibly another version of it.

    I’ve also tried using the WordPress playground to run a fresh WordPress site with both plugins active, and it doesn’t have the error either: https://playground.wordpress.net/?plugin=query-monitor&plugin=debug-bar

    Are you able to duplicate this on a different WordPress site at all?

    Same issue here. 4 months later from above incidence.

    Fatal error: Cannot declare class Debug_Bar, because the name is already in use in /public_html/wp-content/plugins/debug-bar/debug-bar.php on line 20

    Running:
    Query Monitor v3.16.4

    Trying to activate … Debug Bar v1.1.6.

    I also have WP Debugger running, in case that’s somehow playing a part in this, since it’s what was requesting me to install and activate Debug Bar and Query Monitor.

    If I disable Query Monitor, and then enable Debug Bar, I also see this showing up … Deprecated: The called constructor method for Debug_Bar_Panel::Debug_Bar_Panel class in Debug_Bar_Panel is deprecated since version 0.8.3! Use __construct() instead. in?/public_html/wp-includes/functions.php?on line?6078 which isn’t critical, but should be addressed at some stage.

    It’s worth noting … If I activate Query Monitor after activating Debug Bar, I am able to activate Debug Bar without the class error occurring, and Query Monitor activates fine after that..

    • This reply was modified 3 months, 1 week ago by inspired888.
    • This reply was modified 3 months, 1 week ago by inspired888.

    @inspired888 I tried to replicate this on a clean WordPress 6.7.1 install, running on the Apache web server with PHP 8.3.13

    Installed and activated Query Monitor 3.16.4. Then installed and activated Debug Bar 1.1.6. I don’t see any errors logged.

    You mentioned you have WP Debugger running, is this a separate plugin? Have you tried disabling it to see if the error persists?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.