• Resolved OreilleMalade

    (@oreillemalade)


    Hi,

    I’m using your great plugin on another site without any problem but on this site it doesn’t work.

    When I want to define WP-DEBUG to true I get:
    Caught Exception: \Fragen\WP_Debugging\Settings::add_constants() - Unable to locate placement anchor.

    When I want to uninstall the plugin I get:

    Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, bool given in /home/XXX/public_html/wp-content/plugins/wp-debugging/src/Bootstrap.php:186 Stack trace: #0 /home/XXX/public_html/wp-content/plugins/wp-debugging/src/Bootstrap.php(186): array_keys() #1 /home/XXX/public_html/wp-includes/class-wp-hook.php(307): Fragen\WP_Debugging\Bootstrap->deactivate() #2 /home/XXX/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #3 /home/XXX/public_html/wp-includes/plugin.php(476): WP_Hook->do_action() #4 /home/XXX/public_html/wp-admin/includes/plugin.php(814): do_action() #5 /home/XXX/public_html/wp-admin/plugins.php(209): deactivate_plugins() #6 {main} thrown in /home/XXX/public_html/wp-content/plugins/wp-debugging/src/Bootstrap.php on line 186

    When I first activated the plugin I had an error message in the back-office saying:

    This extension generated 199 unexpected output characters when activated. If you notice “headers already sent” messages, problems with your feeds or other issues, try disabling or removing this extension.

    (translated from french)

    Any idea?
    Thanks!
    Best Regards

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter OreilleMalade

    (@oreillemalade)

    More information:

    PHP Fatal error Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, bool given in /home/XXX/public_html/wp-content/plugins/wp-debugging/src/Bootstrap.php:186
    
    Stack trace:
    
    #0 /home/XXX/public_html/wp-content/plugins/wp-debugging/src/Bootstrap.php(186): array_keys()
    #1 /home/XXX/public_html/wp-includes/class-wp-hook.php(307): Fragen\WP_Debugging\Bootstrap->deactivate()
    #2 /home/XXX/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #3 /home/XXX/public_html/wp-includes/plugin.php(476): WP_Hook->do_action()
    #4 /home/XXX/public_html/wp-admin/includes/plugin.php(814): do_action()
    #5 /home/XXX/public_html/wp-admin/plugins.php(209): deactivate_plugins()
    #6 {main}
    thrown in /home/XXX/public_html/wp-content/plugins/wp-debugging/src/Bootstrap.php on line 186
    Plugin Author Andy Fragen

    (@afragen)

    My guess is that you have modified your wp-config.php file and removed or modified the line, https://github.com/WordPress/WordPress/blob/306f53a798a4ec57b29055d324ac76ed528b5410/wp-config-sample.php#L88

    Or this line, https://github.com/WordPress/WordPress/blob/306f53a798a4ec57b29055d324ac76ed528b5410/wp-config-sample.php#L68

    • This reply was modified 2 years, 9 months ago by Andy Fragen.
    Thread Starter OreilleMalade

    (@oreillemalade)

    The first line is in french, as my WP installation is in french, but I never edited that line.

    About the seconde line:
    Actually yes the table prefix is not standard on my website (as a security?enhancement I thought it was always a good practice).
    Do you mean that it could be the issue?
    (FYI you plugin does work on my other website, where the table prefix is not standard?either)

    Thanks again

    Plugin Author Andy Fragen

    (@afragen)

    Can you share what that second line looks like? I’ve tried to target $table_prefix = (.*); As a secondary anchor.

    • This reply was modified 2 years, 9 months ago by Andy Fragen.
    Thread Starter OreilleMalade

    (@oreillemalade)

    Sure.
    $table_prefix = 'rcsrd_';

    Plugin Author Andy Fragen

    (@afragen)

    Can you share the lines above and below?

    Plugin Author Andy Fragen

    (@afragen)

    Thread Starter OreilleMalade

    (@oreillemalade)

    /**
     * Préfixe de base de données pour les tables de WordPress.
     *
     * Vous pouvez installer plusieurs WordPress sur une seule base de données
     * si vous leur donnez chacune un préfixe unique.
     * N’utilisez que des chiffres, des lettres non-accentuées, et des caractères soulignés?!
     */
    $table_prefix  = 'rcsrd_';
    define( 'WP_DEBUG_DISPLAY', false );
    define( 'SAVEQUERIES', true );
    define( 'SCRIPT_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG', true );
    define( 'DISALLOW_FILE_EDIT', true );
    
    /**
     * Pour les développeurs : le mode déboguage de WordPress.

    (I added manually the debug lines because I couldn’t use your plugin)

    Plugin Author Andy Fragen

    (@afragen)

    Does the develop branch work for you?

    Plugin Author Andy Fragen

    (@afragen)

    Just released in new version. Please let me know if it now works.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Caught Exception’ is closed to new replies.