WordPress.org

Make WordPress Core

Opened 7 weeks ago

Last modified 6 weeks ago

#54562 reopened defect (bug)

5.9-beta1 Fatal Error: Class 'WpOrg\Requests\Proxy\HTTP' not found

Reported by: alexeydemidov Owned by: hellofromTonya
Milestone: 6.0 Priority: normal
Severity: blocker Version: trunk
Component: HTTP API Keywords: has-patch
Focuses: Cc:

Description

Our /wp-admin/ broke after installing 5.9-beta1

Fatal error: Uncaught Error: Class 'WpOrg\Requests\Proxy\HTTP' not found in /var/www/develop/public/wp-includes/class-wp-http.php:381 
Stack trace: 
#0 /var/www/develop/public/wp-includes/class-wp-http.php(632): WP_Http->request() 
#1 /var/www/develop/public/wp-includes/http.php(162): WP_Http->get() 
#2 /var/www/develop/public/wp-content/plugins/<...redacted...> wp_remote_get()

We have WP_PROXY_HOST and WP_PROXY_PORT defined in wp-config.php

Replacing WpOrg\Requests\Proxy\HTTP with WpOrg\Requests\Proxy\Http at wp-includes/class-wp-http.php:381 fixed the issue.

Change History (16)

#1 @costdev
7 weeks ago

Hi @alexeydemidov, thanks for reporting this issue and welcome to Trac!

Can you please confirm the method you used to upgrade to 5.9-beta1?

#2 @alexeydemidov
7 weeks ago

@costdev We update it manually by importing unpacked .zip content into our git repo which is automatically deployed to our dev server. All filesystems involved are case-sensitive.

#3 @costdev
7 weeks ago

  • Milestone changed from Awaiting Review to 5.9
  • Summary changed from 5.9-beta1 fails with Uncaught Error: Class 'WpOrg\Requests\Proxy\HTTP' not found in class-wp-http.php:381 to 5.9-beta1 Fatal Error: Class 'WpOrg\Requests\Proxy\HTTP' not found

@alexeydemidov Thank you for confirming. Milestoning this ticket for 5.9.

This ticket was mentioned in PR #2001 on WordPress/wordpress-develop by costdev.


7 weeks ago

  • Keywords has-patch added

This PR changes WpOrg\Requests\Proxy\HTTP to WpOrg\Requests\Proxy\Http.

Trac ticket: https://core.trac.wordpress.org/ticket/54562

#5 follow-up: @costdev
7 weeks ago

A search for WpOrg\\Requests\\([A-Z]{2,}) throughout Core returns 3 instances.
All of these occur in docblocks within the Requests library and are not changed by the PR.

The PR has passed CI and is ready for final review and commit.

#6 @mukesh27
7 weeks ago

Hi there!

@costdev thanks for the PR. It looks good to me and ready to marge.

Let's wait for other dev feedback then we mark it commit

#7 in reply to: ↑ 5 @mukesh27
7 weeks ago

Can you please update docblocks in this Patch otherwise we will get a new ticket for docblocks changes?

Replying to costdev:

All of these occur in docblocks within the Requests library and are not changed by the PR.

#8 @costdev
7 weeks ago

@mukesh27 Done! CI is running on the PR now.

#9 @mukesh27
7 weeks ago

@costdev Please update docblocks in wp-includes/Requests/Proxy/Http.php file

#10 @costdev
7 weeks ago

PR has been updated with the docblock changes too.

#11 @hellofromTonya
6 weeks ago

  • Keywords commit added
  • Owner set to hellofromTonya
  • Status changed from new to reviewing

The Requests files are not maintained by Core, but rather are a dependency that is managed in the Requests library itself. The docblock changes should be reported upstream by opening an issue here https://github.com/WordPress/Requests/issues.

The fix in the PR is approved. I'll revert the Requests docblock changes before committing.

#12 @hellofromTonya
6 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 52315:

HTTP API: Fix classname WpOrg\Requests\Proxy\Http in WP_Http::request().

Renaming the classname was missed in [52244] when updating changes in WP_Http::request() for the Requests 2.0.0 external library upgrade. HTTP class no longer exists and caused a fatal error Fatal error: Uncaught Error: Class 'WpOrg\Requests\Proxy\HTTP' not found.

This commit renames the class to Http and resolves the fatal error.

Follow-up to [52244].

Props alexeydemidov, costdev, mukesh27.
Fixes #54562.

#13 @prbot
6 weeks ago

hellofromtonya commented on PR #2001:

Committed fix only (without docblock changes) in changeset https://core.trac.wordpress.org/changeset/52315.

#14 @hellofromTonya
6 weeks ago

In 52327:

HTTP API: Revert changeset [52315].

Reverting Requests 2.0.0 changes and moving to WordPress 6.0 cycle. Why? The namespace and file case renaming revealed 2 issues in Core's upgrader process.

See https://core.trac.wordpress.org/ticket/54504#comment:22 for more information.

See #54562, #54504.

#15 @hellofromTonya
6 weeks ago

  • Keywords commit removed
  • Milestone changed from 5.9 to 6.0
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening and moving to 6.0 along with #54504.

#16 @SergeyBiryukov
6 weeks ago

In 52328:

HTTP API: Revert changeset [52244].

Reverting Requests 2.0.0 changes and moving to WordPress 6.0 cycle. Why? The namespace and file case renaming revealed 2 issues in Core's upgrader process.

See https://core.trac.wordpress.org/ticket/54504#comment:22 for more information.

Follow-up to [52327].

See #54562, #54504.

Note: See TracTickets for help on using tickets.