Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years 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
Priority: normal Milestone: 5.5
Component: Plugins Version: 5.5
Severity: normal Keywords: has-patch commit dev-reviewed
Cc: Focuses:

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 6 years ago.
Here is a screenshot of the issue when installing the Gutenberg plugin

Download all attachments as: .zip

Change History (12)

@sswebster
6 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.


6 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
6 years ago

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

#3 @SergeyBiryukov
6 years ago

  • Milestone Awaiting Review → 5.5

#4 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Status new → reviewing

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

  • Resolution → fixed
  • Status reviewing → 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
6 years ago

  • Keywords commit dev-feedback added
  • Resolution fixed
  • Status closed → reopened

Reopening for the 5.5 branch.

#9 @whyisjake
6 years ago

  • Keywords dev-reviewed added; dev-feedback removed

#10 @SergeyBiryukov
6 years ago

  • Resolution → fixed
  • Status reopened → 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.