Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#50837 closed defect (bug) (fixed)

Plugins installed outside of the plugin browser are showing an undefined index error

Reported by: sswebster's profile sswebster Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.5
Component: Plugins Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description

When installing plugins outside of the WordPress plugin browser with debugging enabled, I'm receiving a "Notice: Undefined Index: Process_success_specific" error. This doesn't happen when installing a plugin through the plugin browser using ajax, but does happen if you install a plugin by navigating to the install URL. It looks to be related to an upgrader string added in this commit: https://github.com/WordPress/WordPress/commit/49bbff551ba5d8c6e9502835a9dcd466b6585406#diff-572613cbd6b420aa292bf4dab1a5f6e5

Attachments (1)

Screen Shot 2020-08-03 at 9.12.57 PM.png (266.4 KB) - added by sswebster 4 years ago.
Here is a screenshot of the issue when installing the Gutenberg plugin

Download all attachments as: .zip

Change History (12)

@sswebster
4 years ago

Here is a screenshot of the issue when installing the Gutenberg plugin

This ticket was mentioned in PR #452 on WordPress/wordpress-develop by nateinaction.


4 years ago
#1

  • Keywords has-patch added

This PR fixes an undefined index error that occurs when attempting to access the process_success_specific key. The fix prepopulates the WP_Upgrader->strings array, ensuring the process_success_specific key exists.

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

#2 @nateinaction
4 years ago

This patch is my first attempt to contribute to core. All feedback welcome.

#3 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 5.5

#4 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#5 follow-up: @SergeyBiryukov
4 years ago

Just noting that I was able to reproduce the issue, but it's not quite clear why this only happens for plugins and not for themes.

#6 in reply to: ↑ 5 @SergeyBiryukov
4 years ago

Ah, it's because the Theme_Upgrader class has the string in the ::install_strings() method, while Plugin_Upgrader has it in ::upgrade_strings().

Moving the string to the correct method appears to resolve the issue.

#7 @SergeyBiryukov
4 years ago

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

In 48734:

Plugins: Move the "Successfully installed the plugin" string to the correct Plugin_Upgrader method.

The string refers to the installation, and belongs in the ::install_strings() method, not in ::upgrade_strings().

Props sswebster, nateinaction, SergeyBiryukov.
Fixes #50837.

#8 @SergeyBiryukov
4 years ago

  • Keywords commit dev-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for the 5.5 branch.

#9 @whyisjake
4 years ago

  • Keywords dev-reviewed added; dev-feedback removed

#10 @SergeyBiryukov
4 years ago

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

In 48735:

Plugins: Move the "Successfully installed the plugin" string to the correct Plugin_Upgrader method.

The string refers to the installation, and belongs in the ::install_strings() method, not in ::upgrade_strings().

Props sswebster, nateinaction.
Reviewed by whyisjake, SergeyBiryukov.
Merges [48734] to the 5.5 branch.
Fixes #50837.

Note: See TracTickets for help on using tickets.