Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#37735 closed defect (bug) (invalid)

Can not proceed with plugin upgrades after upgrade of core WP to 4.6

Reported by: pmirek's profile pmirek Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: HTTP API Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by swissspidy)

Versions:

./wp-cli.phar plugin search "test" --path=/apps/knowledge_base/wordpress/
WordPress version: 4.6
Database revision: 37965
TinyMCE version: 4.401 (4401-20160726)

wp-cli : latest version
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
Errors:
./wp-cli.phar plugin search "test" --path=/apps/knowledge_base/wordpress/
PHP Notice: Undefined index: SERVER_PORT in /apps/knowledge_base/wordpress/wp-content/plugins/ajax-search-lite/includes/functions/functions.php on line 514
Notice: Undefined index: SERVER_PORT in /apps/knowledge_base/wordpress/wp-content/plugins/ajax-search-lite/includes/functions/functions.php on line 514
PHP Notice: Undefined index: SERVER_NAME in /apps/knowledge_base/wordpress/wp-content/plugins/ajax-search-lite/includes/functions/functions.php on line 515
Notice: Undefined index: SERVER_NAME in /apps/knowledge_base/wordpress/wp-content/plugins/ajax-search-lite/includes/functions/functions.php on line 515
PHP Notice: Undefined index: SERVER_PORT in /apps/knowledge_base/wordpress/wp-content/plugins/ajax-search-lite/includes/functions/functions.php on line 515
Notice: Undefined index: SERVER_PORT in /apps/knowledge_base/wordpress/wp-content/plugins/ajax-search-lite/includes/functions/functions.php on line 515
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 support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /apps/knowledge_base/wordpress/wp-admin/includes/plugin-install.php on line 158
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 support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /apps/knowledge_base/wordpress/wp-admin/includes/plugin-install.php on line 158
Error: 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 support forums. Try again

This one is because of some connectivity issue. May be related to latest fixes: #37494

http_proxy sys env works fine, as I can access wordpress plugins zip files manually with curl or wget.

Change History (10)

#1 @pmirek
8 years ago

  • Summary changed from Can proceed with plugin upgrades after upgrade of core WP to 4.6 to Can not proceed with plugin upgrades after upgrade of core WP to 4.6

#2 @swissspidy
8 years ago

  • Description modified (diff)

#3 @swissspidy
8 years ago

  • Keywords reporter-feedback added

Hey there,

Thanks for your report!

Does this also happen when searching plugins from within the admin? Trac isn't for bugs in WP-CLI.

Ignoring the warnings from your CLI output, "An unexpected error occurred" might be related to #37700.

Would you mind having a look at it and applying the changes from [38274] on your system to see if it resolves the issue?

#4 @pmirek
8 years ago

Same issue & output after applying changes from [38274] I'm afraid

#5 @pmirek
8 years ago

Search from admin plugins/search text form seems to be fine, at least gets back with the search results

#6 @swissspidy
8 years ago

Hmm so the error occurs in wp-admin/includes/plugin-install.php on line 158 because wp_remote_post() is failing.

Could you add a var_dump( $request ); line just above trigger_error( … ) so we can see what the exact error output is?

I want to confirm if this is a bug introduced with the recent WP_Http changes or not. If not, we'd have to continue this discussion in the support forums.

#7 @pmirek
8 years ago

var_dump( $args );
var_dump( $url );
var_dump( $http_args );
var_dump( $request );

gives

object(stdClass)#1604 (5) {
  ["per_page"]=>
  int(10)
  ["page"]=>
  int(1)
  ["search"]=>
  string(16) "ajax search lite"
  ["fields"]=>
  array(3) {
    ["name"]=>
    bool(true)
    ["slug"]=>
    bool(true)
    ["rating"]=>
    bool(true)
  }
  ["locale"]=>
  string(5) "en_US"
}

string(43) "https://api.wordpress.org/plugins/info/1.0/"

array(2) {
  ["timeout"]=>
  int(15)
  ["body"]=>
  array(2) {
    ["action"]=>
    string(13) "query_plugins"
    ["request"]=>
    string(182) "O:8:"stdClass":5:{s:8:"per_page";i:10;s:4:"page";i:1;s:6:"search";s:16:"ajax search lite";s:6:"fields";a:3:{s:4:"name";b:1;s:4:"slug";b:1;s:6:"rating";b:1;}s:6:"locale";s:5:"en_US";}"
  }
}

object(WP_Error)#1613 (2) {
  ["errors"]=>
  array(1) {
    ["http_request_failed"]=>
    array(1) {
      [0]=>
      string(55) "cURL error 6: Couldn't resolve host 'api.wordpress.org'"
    }
  }
  ["error_data"]=>
  array(0) {
  }
}

That is what I've already configured, that proxy seems not be respected after upgrade when using wp-cli.

I can't see here anything related to proxy.

does

 $request = wp_remote_post( $url, $http_args );

accepts proxy setting, as I can't see any related parameters?

#8 @pmirek
8 years ago

Any updates on this?

#9 @pmirek
8 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

https://github.com/wp-cli/wp-cli/issues/3315

Confirmed to be wp-cli issue. Closing this one.

#10 @swissspidy
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution changed from wontfix to invalid
Note: See TracTickets for help on using tickets.