WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#50837 closed defect (bug) (fixed)

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

Reported by: sswebster Owned by: 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 3 months ago.
Here is a screenshot of the issue when installing the Gutenberg plugin

Download all attachments as: .zip

Change History (12)

@sswebster
3 months 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.


3 months ago

  • 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
3 months ago

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

#3 @SergeyBiryukov
3 months ago

  • Milestone changed from Awaiting Review to 5.5

#4 @SergeyBiryukov
3 months ago

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

#5 follow-up: @SergeyBiryukov
3 months 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
3 months 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
3 months 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
3 months ago

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

Reopening for the 5.5 branch.

#9 @whyisjake
3 months ago

  • Keywords dev-reviewed added; dev-feedback removed

#10 @SergeyBiryukov
3 months 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.