WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 23 months ago

Last modified 23 months ago

#32435 closed defect (bug) (fixed)

error messages returned by auth modal when trying to update a plugin lack detail

Reported by: TerraFrost Owned by: dd32
Milestone: 4.2.3 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: fixed-major
Focuses: Cc:

Description

If you try to update a plugin and encounter an error via the auth modal you'll get a generic "Unable to connect to the filesystem. Please confirm your credentials." instead of a more detailed and more helpful error message like any of the ones wp-admin/includes/class-wp-filesystem-ssh2.php actually generates. eg.

  • Failed to connect to SSH2 Server %1$s:%2$s
  • Username/Password incorrect for %s
  • Public and Private keys incorrect for %s

This is because the bulk_upgrader method in wp-admin/includes/class-wp-upgrader.php returns a false rather than the actual error. Two other changes need to be made for it to work as detailed in the attached patch.

Attachments (1)

terrafrost.patch (1.7 KB) - added by TerraFrost 2 years ago.
patch fixing this issue

Download all attachments as: .zip

Change History (15)

@TerraFrost
2 years ago

patch fixing this issue

#1 @dd32
2 years ago

In 32571:

Updates: Correctly identify more failed update cases. This checks for a WP_Error being raised during an individual update, in addition to just the bootstrap error cases.
The error message in these cases is still not displayed in the UI.

See #32473, #32435

#2 @dd32
2 years ago

  • Milestone changed from Awaiting Review to 4.2.3

#3 @samuelsidler
2 years ago

@dd32: Same question here. :)

#4 @dd32
2 years ago

In 32776:

Updates: When a connection failure occurs, and no credential form is present client side, allow it to fall through to the normal failure handlers.
See #32435

#5 @dd32
2 years ago

In 32777:

Updates: Better handling when the credential form is long (such as when SSH is active). This adds scrolling to the dialogue, and hides the SSH-specific fields when not using the SSH handler.
See #32435

#6 @dd32
2 years ago

In 32778:

Updates: When a error occurs during the connection phase, pass the error message back as the ajax failure message.
See #32435

#7 @dd32
2 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 32779:

Updates: Display the failure reason in addition to 'Update Failed', allows for debugging by site owners.
Fixes #32435, #32473

#8 @dd32
2 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

re-opening for 4.2.x, the fix there will need to be a subset of the 4.3 changes

#9 @dd32
23 months ago

In 33302:

Updates: Correctly identify more failed update cases.
This checks for a WP_Error being raised during an individual update, in addition to just the bootstrap error cases.
When a error occurs during the connection phase, pass the error message back as the ajax failure message.

Merges [32571] & [32778] to the 4.2 branch

See #32473, #32435

#10 @dd32
23 months ago

In 33303:

Updates: When a connection failure occurs, and no credential form is present client side, allow it to fall through to the normal failure handlers.

Merges [32776] to the 4.2 branch
See #32435

#11 @dd32
23 months ago

In 33304:

Updates: Better handling when the credential form is long (such as when SSH is active).

Merges the JS changes from [32777] to the 4.2 branch
See #32435

#12 @dd32
23 months ago

In 33305:

Updates: Display the failure reason in addition to 'Update Failed', allows for debugging by site owners.

Merges the behaviour of [32779] to the 4.2 branch without a string change.
See #32435, #32473

#13 @dd32
23 months ago

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

Fixed for 4.2.3

#14 @dd32
23 months ago

In 33319:

Updates: Better handling when the credential form is long (such as when SSH is active). This adds scrolling to the dialogue, and hides the SSH-specific fields when not using the SSH handler.

Merges [32777] to the 4.2 branch, the JS changes were previously merged in [33304]
See #32435

Note: See TracTickets for help on using tickets.