wp-login.php fatal error after 3.8 update, even 3.8.1
-
This week after we updated Polylang plugin from 3.7.8 to 3.8 our wp-login.php page broke.
To login and to logout.
Tried to update to 3.8.1 but the crash continued.I had to rollback to 3.7.8 so people could login.
AI insight:
The Polylang plugin is attempting to call get_query_var() during initialization (wp_settings.php → hook init), but the global object $wp_query does not yet exist at that point. This is a Polylang compatibility bug—it is executing the “frontend” code (content-based language detection) on the login screen, where the main WordPress query has not yet been initialized.[19-Mar-2026 13:24:47 UTC] PHP Fatal error: Uncaught Error: Call to a member function get() on null in /var/www/htdocs/wp-includes/query.php:29
Stack trace:
#0 /var/www/htdocs/wp-content/plugins/polylang/src/frontend/choose-lang-content.php(57): get_query_var()
#1 /var/www/htdocs/wp-content/plugins/polylang/src/frontend/choose-lang.php(88): PLL_Choose_Lang_Content->get_current_language()
#2 /var/www/htdocs/wp-content/plugins/polylang/src/frontend/choose-lang-content.php(39): PLL_Choose_Lang->set_language()
#3 /var/www/htdocs/wp-content/plugins/polylang/src/frontend/choose-lang.php(64): PLL_Choose_Lang_Content->set_language()
#4 /var/www/htdocs/wp-content/plugins/polylang/src/frontend/choose-lang-content.php(22): PLL_Choose_Lang->init()
#5 /var/www/htdocs/wp-content/plugins/polylang/src/frontend/frontend.php(134): PLL_Choose_Lang_Content->init()
#6 /var/www/htdocs/wp-content/plugins/polylang/src/class-polylang.php(280): PLL_Frontend->init()
#7 /var/www/htdocs/wp-content/plugins/polylang/src/class-polylang.php(224): Polylang->init_context()
#8 /var/www/htdocs/wp-includes/class-wp-hook.php(341): Polylang->init()
#9 /var/www/htdocs/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
#10 /var/www/htdocs/wp-includes/plugin.php(522): WP_Hook->do_action()
#11 /var/www/htdocs/wp-settings.php(593): do_action()
#12 /var/www/wp-config.php(141): require_once('...')
#13 /var/www/htdocs/wp-load.php(55): require_once('...')
#14 /var/www/htdocs/wp-login.php(12): require('...')
#15 {main}
thrown in /var/www/htdocs/wp-includes/query.php on line 29Stack trace:
wp-login.php → wp-load.php → wp-config.php → wp-settings.php (hook init)
→ Polylang->init() → PLL_Frontend->init()
→ PLL_Choose_Lang_Content->init() → get_query_var() → FATAL
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.