[wp-trac] [WordPress Trac] #25792: update notifier silently fails- states incorrectly that core, themes, and plugins are up-to-date
WordPress Trac
noreply at wordpress.org
Thu Oct 31 19:46:01 UTC 2013
#25792: update notifier silently fails- states incorrectly that core, themes, and
plugins are up-to-date
-----------------------------+-----------------------------
Reporter: wordpressmike | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 3.7.1
Severity: normal | Keywords:
-----------------------------+-----------------------------
One of my Wordpress installs running WP 3.6.1 did not notify me of
available WP core, theme, and plugin updates. Ultimately this was due to a
DNS issue that was not reported by Wordpress.
I would repeatedly go to /wp-admin/update-core.php and it would say I have
the latest versions.
I thought maybe I had a corrupt install, so I manually updated to 3.7 and
then manually updated to 3.7.1- These updates did not cure the problem.
I looked at my debug logs and they contained the following not-very-
helpful errors, pointing to lines 112, 259, and 299 of wp-
includes/update.php:
{{{
[Thu Oct 31 15:14:08 2013] [error] [client 127.0.0.1] PHP Warning: An
unexpected error occurred. Something may be wrong with WordPress.org or
this server’s configuration. If you continue to have problems,
please try the <a href="http://wordpress.org/support/">support forums</a>.
(WordPress could not establish a secure connection to WordPress.org.
Please contact your server administrator.) in /var/www/html/wp-
includes/update.php on line 112, referer: http://mysite.com/
[Thu Oct 31 15:14:14 2013] [error] [client 127.0.0.1] PHP Warning: An
unexpected error occurred. Something may be wrong with WordPress.org or
this server’s configuration. If you continue to have problems,
please try the <a href="http://wordpress.org/support/">support forums</a>.
(WordPress could not establish a secure connection to WordPress.org.
Please contact your server administrator.) in /var/www/html/wp-
includes/update.php on line 259, referer: http://mysite.com/
[Thu Oct 31 15:14:20 2013] [error] [client 127.0.0.1] PHP Warning: An
unexpected error occurred. Something may be wrong with WordPress.org or
this server’s configuration. If you continue to have problems,
please try the <a href="http://wordpress.org/support/">support forums</a>.
(WordPress could not establish a secure connection to WordPress.org.
Please contact your server administrator.) in /var/www/html/wp-
includes/update.php on line 399, referer: http://mysite.com/
}}}
So two bugs- '''first''' is the silent fail of the updater GUI and
'''second''' is the unhelpful error produced in the logs.
The error produced in line 399 is triggered based on the following if
statement (where $raw_response = wp_remote_post( $url, $options )):
{{{
if ( $ssl && is_wp_error( $raw_response ) )
}}}
so I modified line 399 to output the relevant variables according to
the following:
{{{
trigger_error( __($url . ' is url. ssl is ' . $ssl . 'raw response
is ' . $raw_response->get_error_message() . ' An unexpected error
occurred. Something may be wrong with WordPress.org or this server’s
configuration. If you continue to have problems, please try the <a
href="http://wordpress.org/support/">support forums</a>.' ) . ' ' .
'(WordPress could not establish a secure connection to WordPress.org.
Please contact your server administrator.)', headers_sent() || WP_DEBUG ?
E_USER_WARNING : E_USER_NOTICE );
}}}
It turned out that the nslookup was failing in attempting to connect to
the URL https://api.wordpress.org/themes/update-check/1.1/
I've fixed the nslookup issue on my end but would appreciate it if the
error messaging, both in the debug log and the GUI were improved so users
don't falsely think that updates aren't available.
At the minimum, the $raw_response->get_error_message() should be output as
well as the $url that is being contacted.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25792>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list