Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#54886 closed defect (bug) (fixed)

"Show hidden updates" button is invisible

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.9.1 Priority: normal
Severity: normal Version: 5.5
Component: Upgrade/Install Keywords: has-patch has-screenshots fixed-major needs-testing has-testing-info
Focuses: ui, javascript, administration Cc:

Description (last modified by SergeyBiryukov)

Background: #43242, #49407.

Reported by @malinevskiy on Russian support forums: How do I bring back the Update Now button?

In recent WordPress versions, the "Show hidden updates" button on the WordPress Updates screen is invisible and cannot be used.

Steps to reproduce:

  1. Install a localized package (not the latest), e.g. WordPress 5.7-ru_RU.
  2. Make sure to complete the installation in a non-English language, as the "Hide this update" button is only available for localized installs.
  3. Go to the WordPress Updates screen.
  4. Next to the update to the latest localized version (currently WordPress 5.8.3–ru_RU), click "Hide this update".
  5. Note that the hidden update is completely gone from the screen and cannot be brought back.

The expected result is to get a "Show hidden updates" button, which displays a list of previously hidden updates with an option to bring them back or update right away.

I have traced the issue back to [48323]. Before that change, the button is visible and works as expected. There is some JS code on the WordPress Updates screen to handle that button, which uses the .toggle( handler, handler ) method signature deprecated in jQuery 1.8 and removed in jQuery 1.9. Apparently this functionality was previously polyfilled by jQuery Migrate 1.4.1, and is no longer available after its removal.

The JS code in question should be updated for jQuery 1.9+. This is not strictly a WordPress 5.9 issue, but still a recent regression, so I'm proposing the fix for 5.9.1 consideration.

Attachments (4)

54886.before.png (25.9 KB) - added by SergeyBiryukov 2 years ago.
54886.diff (1.5 KB) - added by SergeyBiryukov 2 years ago.
54886.after.not-expanded.png (30.6 KB) - added by SergeyBiryukov 2 years ago.
54886.after.expanded.png (46.0 KB) - added by SergeyBiryukov 2 years ago.

Download all attachments as: .zip

Change History (12)

@SergeyBiryukov
2 years ago

#1 @SergeyBiryukov
2 years ago

Some history here: [9441], [9543], [42785], [48323].

#2 @SergeyBiryukov
2 years ago

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

In 52644:

Upgrade/Install: Make sure the "Show hidden updates" button is visible and works as expected.

The .toggle( handler, handler ) method signature was deprecated in jQuery 1.8 and removed in jQuery 1.9.

This commit updates the click handler function to work with jQuery 1.9+.

Follow-up to [9441], [9543], [42785], [48323].

Props malinevskiy, SergeyBiryukov.
Fixes #54886.

#3 @SergeyBiryukov
2 years ago

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

Reopening for 5.9.1 consideration.

#4 @SergeyBiryukov
2 years ago

  • Description modified (diff)

#5 @Boniu91
2 years ago

  • Keywords needs-testing has-testing-info added

This ticket was mentioned in Slack in #core-test by boniu91. View the logs.


2 years ago

This ticket was mentioned in Slack in #core by sergey. View the logs.


2 years ago

#8 @SergeyBiryukov
2 years ago

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

In 52713:

Upgrade/Install: Make sure the "Show hidden updates" button is visible and works as expected.

The .toggle( handler, handler ) method signature was deprecated in jQuery 1.8 and removed in jQuery 1.9.

This commit updates the click handler function to work with jQuery 1.9+.

Follow-up to [9441], [9543], [42785], [48323].

Props malinevskiy, Boniu91, SergeyBiryukov.
Merges [52644] to the 5.9 branch.
Fixes #54886.

Note: See TracTickets for help on using tickets.