Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 15 months ago

#57183 closed defect (bug) (fixed)

After deleting updateable themes, the incorrect update count is displayed.

Reported by: nazmulhasan103 Owned by: audrasjb
Priority: normal Milestone: 6.2
Component: Upgrade/Install Version:
Severity: normal Keywords: has-patch has-test-info has-screenshots commit
Cc: Focuses: javascript, administration

Description

Even though I deleted an updateable theme since it didn't immediately update the decremented total, everything is OK after refreshing the page.

  1. When an updateable theme is deleted: https://prnt.sc/3ugZBS9cRboF
  2. After refreshing the page: https://prnt.sc/tcvo1x6qBwno

Change History (24)

This ticket was mentioned in PR #3669 on WordPress/wordpress-develop by themeaazz.


4 years ago
#1

  • Keywords has-patch added

#2 @riccardodicurti
4 years ago

Hi @nazmulhasan103,
how about moving your if before:

wp.a11y.speak( _x( 'Deleted!', 'theme' ) );

I was looking at the code again, do you decrease the number of updates even if you delete a theme that doesn't need to be updated? I'm wrong?

Version 1, edited 4 years ago by riccardodicurti (previous) (next) (diff)

#3 @sabernhardt
4 years ago

#52306 was marked as a duplicate.

#4 @sabernhardt
4 years ago

  • Component AdministrationUpgrade/Install
  • Keywords needs-testing added
  • Type feature requestdefect (bug)
  • Version 6.1.1

@Hinjiriyo shared steps to reproduce the bug (or to test a patch) in #52306.

How to reproduce the bug:

  1. The Update icon in the admin bar shows a number of available updates. There is at least one inactive, outdated theme (e.g. a theme for which an upgrade is available, and it is not the active theme).
  2. Go to "Appearance" > "Themes" and delete that theme.
  3. Since there is one outdated item less, you would expect a number reduced by 1 at the Update icon. But the number remains unchanged.

I'll add Step 4: Check the number next to "Themes" in the admin side menu to verify that it also is reduced by one.

Last edited 4 years ago by sabernhardt (previous) (diff)

This ticket was mentioned in PR #3671 on WordPress/wordpress-develop by @riccardodicurti.


4 years ago
#5

After deleting updatable themes, the incorrect update count is displayed.

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

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


4 years ago

#7 @ironprogrammer
4 years ago

  • Keywords has-testing-info has-screenshots added

Welcome to Trac, and thank you for this report, @nazmulhasan103!

To move this forward, it would be great to have an issue reproduction report, followed by a patch test report.

#8 @costdev
4 years ago

Reproduction Report

This report validates that the issue can be reproduced.

Environment

  • Server: Apache (Linux)
  • WordPress: 6.2-alpha-54642-src
  • Browser: Chrome 107.0.0.0
  • OS: Windows 10
  • Theme: Twenty Twenty-Two
  • Plugins: None activated

Actual Results

  • ✅ Error condition occurs (reproduced).

#9 follow-up: @costdev
4 years ago

Test Report

This report validates that the indicated patch addresses the issue.

Patch tested: https://github.com/WordPress/wordpress-develop/pull/3669

Environment

  • Server: Apache (Linux)
  • WordPress: 6.2-alpha-54642-src
  • Browser: Chrome 107.0.0.0
  • OS: Windows 10
  • Theme: Twenty Twenty-Two
  • Plugins: None activated

Actual Results

  • ✅ Issue resolved with patch.

#10 @costdev
4 years ago

Test Report

This report validates that the indicated patch addresses the issue.

Patch tested: https://github.com/WordPress/wordpress-develop/pull/3671

Environment

  • Server: Apache (Linux)
  • WordPress: 6.2-alpha-54642-src
  • Browser: Chrome 107.0.0.0
  • OS: Windows 10
  • Theme: Twenty Twenty-Two
  • Plugins: None activated

Actual Results

  • ✅ Issue resolved with patch.

#11 @costdev
4 years ago

  • Milestone Awaiting Review6.2

Both patches resolve the issue.

Milestoning for 6.2 so that both PRs can be reviewed to determine the desired one to move forward with.

#12 in reply to: ↑ 9 @nazmulhasan103
4 years ago

Thank's @costdev

This ticket was mentioned in Slack in #core-upgrade-install by afragen. View the logs.


4 years ago

This ticket was mentioned in Slack in #core-upgrade-install by costdev. View the logs.


4 years ago

#15 @robinwpdeveloper
4 years ago

First of all https://github.com/WordPress/wordpress-develop/pull/3669 looks better to me as it contains proper spacing, semi colon, doc block etc.
And passed all checks.

I will submit test report soon here.

Last edited 4 years ago by robinwpdeveloper (previous) (diff)

#16 @robinwpdeveloper
4 years ago

Test Report

This report validates that the indicated patch addresses the issue.

Patch tested: https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/3669.diff

Environment

  • OS: macOS 11.2.3
  • Web Server: Nginx
  • PHP: 7.4.30
  • WordPress: 6.2-alpha-54642-src
  • Browser: Chrome 109.0.5414.119
  • Theme: Twenty Twenty-One
  • Active Plugins:
    • No plugins activated

Actual Results

  • ✅ Issue resolved with patch.

Additional Notes

  • Successfully reproduced the issue
  • Applied patch fix the count of the top icon as well as left sidebar icon

Supplemental Artifacts

Before: https://d.pr/i/zr7V5T

After: https://d.pr/i/BNb1Z8

#17 @rahmantasnia
4 years ago

Test Report

This report validates that the indicated patch addresses the issue.

Patch tested: https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/3669.diff

Environment

  • OS: macOS 13.1
  • Web Server: Nginx
  • PHP: 7.4.33
  • WordPress: 6.2-alpha-54642-src
  • Browser: Chrome
  • Theme: Twenty Twenty-Three
  • Active Plugins:
    • No plugins activated

Actual Results

  • ✅ Issue resolved with patch.

When 2 themes were downgraded, this issue appeared: https://prnt.sc/w75T1ENIpJlE
After the patch was applied, the issue was resolved: https://prnt.sc/Mmky91kdSsCK

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


4 years ago

#19 @costdev
4 years ago

  • Keywords needs-testing removed

#20 @costdev
4 years ago

  • Keywords commit added

This ticket was reviewed during the recent bug scrub. Adding for commit consideration.

Additional props: @hellofromTonya

#21 @audrasjb
4 years ago

  • Owner set to audrasjb
  • Status newaccepted

Self assigning for commit consideration.

#22 @audrasjb
4 years ago

  • Resolutionfixed
  • Status acceptedclosed

In 55359:

Upgrade/Install: Update available theme updates count when a theme si deleted.

This changeset fixes an issue where the available theme updates count was not updated after a theme is deleted.

Props nazmulhasan103, riccardodicurti, sabernhardt, ironprogrammer, costdev, robinwpdeveloper, rahmantasnia.
Fixes #57183.

#24 @wordpressdotorg
15 months ago

  • Keywords has-test-info added; has-testing-info removed
Note: See TracTickets for help on using tickets.