Opened 13 months ago
Last modified 4 hours ago
#62681 new defect (bug)
The theme count in Customizer > Change > WordPress.org Themes displays incorrect results
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Customize | Keywords: | has-test-info has-patch has-screenshots |
| Focuses: | Cc: |
Description
When navigating to Customize > Change > WordPress.org Themes, selecting filters for theme search and then deselecting the filters immediately results in an incorrect theme count being displayed.
Steps to Reproduce:
- Go to Appearance > Customize > Change > WordPress.org Themes.
- Apply any filter to search for themes (e.g., Accessibility Ready, Block Editor Patterns, Block Editor Styles, etc).
- Deselect the applied filters instantly.
- Notice that the theme count displayed is incorrect.
Video:
https://utfs.io/f/TnWMEUzoUd855CZXZgBsSwYB9kjRr72FlZL3UcDuaPMOHhCG
Attachments (1)
Change History (12)
#2
follow-up:
↓ 3
@
13 months ago
Sometimes, incorrect functionality in the WordPress Customizer can be caused by plugin or theme conflicts. To rule out this possibility:
- Deactivate all plugins and switch to a default theme like Twenty Twenty-Three.
- Test the theme filter behavior again. If the issue persists, it’s likely a core WordPress bug. If the behavior changes, reactivate plugins one by one to identify the conflicting component.
#3
in reply to:
↑ 2
@
13 months ago
Replying to usmandev000:
Sometimes, incorrect functionality in the WordPress Customizer can be caused by plugin or theme conflicts. To rule out this possibility:
- Deactivate all plugins and switch to a default theme like Twenty Twenty-Three.
- Test the theme filter behavior again. If the issue persists, it’s likely a core WordPress bug. If the behavior changes, reactivate plugins one by one to identify the conflicting component.
@ankitkumarshah try this, if the issue still persists, please let me know.
#4
@
13 months ago
- Keywords needs-patch has-testing-info added
Hey @ankitkumarshah,
I was able to reproduce the issue. Additionally, I tried the suggestions provided by @usmandev000, but the problem still persists. I also investigated further to identify the root cause and found that the issue is related to this section of the code but I wasn't able to discover the root cause.
#5
@
13 months ago
Reproduction Report
Description
This report validates whether the issue can be reproduced.
Environment
- WordPress: 6.8-alpha-59274-src
- PHP: 8.2.26
- Server: nginx/1.27.3
- Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.26)
- Browser: Chrome 131.0.0.0
- OS: Linux
- Theme: Twenty Twenty-One 2.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Error condition occurs (reproduced).
Additional Notes
- When we deselect an applied filter or select another filter instantly, this issue is reproduced because there is a condition, such as
section.loadingbeing true, in theinitializeNewQuery,filtersChecked, andloadThemesfunctions. This indicates whether the theme section is fully loaded or not.
- To address this, we could consider adding a loader when a filter is selected or deselected. However, this might frustrate end-users by making them wait to deselect a filter or select another option. If anyone has suggestions on how to handle this scenario more efficiently, please share your ideas.
#7
@
13 months ago
Reproduction Report
Description
This report validates whether the issue can be reproduced.
Environment
- WordPress: 6.7.1
- PHP: 8.2.23
- Server: nginx/1.26.1
- Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.2.23)
- Browser: Chrome 131.0.0.0
- OS: Windows 10
- Theme: Twenty Twenty-One 2.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Error condition occurs (Reproduced).
Supplemental Artifacts
#8
@
13 months ago
Hey @parthvataliya,
I’ve tested the patch for the reported issue, and it’s working well on my end. To provide further clarity, I’ve attached a demonstration video below showcasing the fix in action.
Video: https://utfs.io/f/PL8E4NiPUWyOoSlhSjgRVfkrM3cxj5whHLEvyNZCb2PpWuod
#11
@
4 hours ago
- Keywords has-screenshots added; needs-testing removed
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/62681/62681.patch
Environment
- WordPress: 7.0-alpha-61215-src
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
- Browser: Chrome 143.0.0.0
- OS: macOS
- Theme: Twenty Twenty-One 2.7
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.1
Steps to Reproduce
- Select any classic theme
- Appearance > Customize
- Click Change button next to the Active Theme
- Select WordPress.org themes
- Note the number of themes found at the top (as of the time my testing 8042)
- Click Filter themes
- Watch the number of themes found while clicking the filter checkboxes.
- Before applying patch, if you deselect a filter before the AJAX query properly completes, number of themes number may stay wrong.
Actual Results
- ✅ Issue resolved with patch.
- Deselecting a filter before the query completes does not cause issue and it always returns the correct number independent of when the checkbox is deselected.
Supplemental Artifacts
Video before:
https://files.catbox.moe/0u3fk8.mp4
Video after:
https://files.catbox.moe/re02nf.mp4

This issue may be related to caching or a delayed refresh of the theme count. As a temporary workaround: