[Plugin: WordPress SEO by Yoast] Notice: Undefined index: wp_the_query
-
I get a notice from wp-seo. Basically, WPSEO_Frontend::__construct() calls wp_reset_query(). Since this is included as soon as the plugin is loaded instead of from a hook, $GLOBALS[‘wp_query’] doesn’t yet exist, which wp_reset_query() tries to use. If you’re just trying to reset something *if* another plugin has messed with it, you could probably do:
if ( isset( $GLOBALS['wp_query'] ) ) wp_reset_query();
Here’s the actual notice:
Notice: Undefined index: wp_the_query in /var/www/vhosts/bluedog/wordpress/wp-includes/query.php on line 108 Call Stack: 0.0002 638792 1. {main}() /var/www/vhosts/bluedog/index.php:0 0.0004 644320 2. require('/var/www/vhosts/bluedog/wordpress/wp-blog-header.php') /var/www/vhosts/bluedog/index.php:17 0.0007 667336 3. require_once('/var/www/vhosts/bluedog/wordpress/wp-load.php') /var/www/vhosts/bluedog/wordpress/wp-blog-header.php:12 0.0010 694368 4. require_once('/var/www/vhosts/bluedog/wp-config.php') /var/www/vhosts/bluedog/wordpress/wp-load.php:34 0.0022 834760 5. require_once('/var/www/vhosts/bluedog/wordpress/wp-settings.php') /var/www/vhosts/bluedog/wp-config.php:98 0.1240 36844520 6. include_once('/var/www/vhosts/bluedog/bd-content/plugins/wordpress-seo/wp-seo.php') /var/www/vhosts/bluedog/wordpress/wp-settings.php:196 0.1305 38138568 7. require('/var/www/vhosts/bluedog/bd-content/plugins/wordpress-seo/frontend/class-frontend.php') /var/www/vhosts/bluedog/bd-content/plugins/wordpress-seo/wp-seo.php:58 0.1305 38138952 8. WPSEO_Frontend->__construct() /var/www/vhosts/bluedog/bd-content/plugins/wordpress-seo/frontend/class-frontend.php:829 0.1305 38138952 9. wp_reset_query() /var/www/vhosts/bluedog/bd-content/plugins/wordpress-seo/frontend/class-frontend.php:7
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘[Plugin: WordPress SEO by Yoast] Notice: Undefined index: wp_the_query’ is closed to new replies.