wp-rocket
wp-rocket copied to clipboard
Container V4 service provider lied about providing (options_debug) service
Before submitting an issue please check that you’ve completed the following steps:
- Made sure you’re on the latest version
- Used the search feature to ensure that the bug hasn’t been reported before
Describe the bug
After updating the container to V4, we cannot use options_debug
in Rucss debug tool.
we are getting this error
Fatal error: Uncaught WP_Rocket\Dependencies\League\Container\Exception\ContainerException: Service provider lied about providing (options_debug) service in /home/mostafa/Local Sites/wp-copra/app/public/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Container.php:195 Stack trace: #0 /home/mostafa/Local Sites/wp-copra/app/public/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Container.php(118): WP_Rocket\Dependencies\League\Container\Container->resolve('options_debug') #1 /home/mostafa/Local Sites/wp-copra/app/public/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Container.php(203): WP_Rocket\Dependencies\League\Container\Container->get('options_debug') #2 /home/mostafa/Local Sites/wp-copra/app/public/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Container.php(118): WP_Rocket\Dependencies\League\Container\Container->resolve('options_debug') #3 /home/mostafa/Local Sites/wp-copra/app/public/wp-content/plugins/rucss-debug-tool/configs/binding.php(87): WP_Rocket\Dependencies\League\Container\Container->get('options_debug') #4 /home/mostafa/Local Sites/wp-copra/app/public/wp-content/plugins/rucss-debug-tool/inc/main.php(24): require_once('/home/mostafa/L...') #5 /home/mostafa/Local Sites/wp-copra/app/public/wp-includes/class-wp-hook.php(324): WPRocket\RUCSSDebugTool\init('') #6 /home/mostafa/Local Sites/wp-copra/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #7 /home/mostafa/Local Sites/wp-copra/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #8 /home/mostafa/Local Sites/wp-copra/app/public/wp-content/plugins/wp-rocket/inc/main.php(102): do_action('wp_rocket_loade...') #9 /home/mostafa/Local Sites/wp-copra/app/public/wp-includes/class-wp-hook.php(324): rocket_init('') #10 /home/mostafa/Local Sites/wp-copra/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #11 /home/mostafa/Local Sites/wp-copra/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #12 /home/mostafa/Local Sites/wp-copra/app/public/wp-settings.php(550): do_action('plugins_loaded') #13 /home/mostafa/Local Sites/wp-copra/app/public/wp-config.php(108): require_once('/home/mostafa/L...') #14 /home/mostafa/Local Sites/wp-copra/app/public/wp-load.php(50): require_once('/home/mostafa/L...') #15 /home/mostafa/Local Sites/wp-copra/app/public/wp-blog-header.php(13): require_once('/home/mostafa/L...') #16 /home/mostafa/Local Sites/wp-copra/app/public/index.php(17): require('/home/mostafa/L...') #17 {main} thrown in /home/mostafa/Local Sites/wp-copra/app/public/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Container.php on line 195
Notice: Function is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/mostafa/Local Sites/wp-copra/app/public/wp-includes/functions.php on line 6078
Notice: Function is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/mostafa/Local Sites/wp-copra/app/public/wp-includes/functions.php on line 6078
There has been a critical error on this website.
Learn more about troubleshooting WordPress.
With @CrochetFeve0251 help we checked and in wp-rocket we are bailing out here and we don't serve it
To Reproduce Steps to reproduce the behavior:
- Add rucss-debug-tool and switch to the branch of this PR
- open admin page
- See error
Expected behavior
We should use the options_debug
like this
$container->get('options_debug' ),
Screenshots