#42346 closed defect (bug) (worksforme)
Theme count is wrong in customizer
| Reported by: | subrataemfluence | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Customize | Version: | 4.8.2 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | javascript, administration |
Description
When I go to Appearance > Customize > Change Theme and type in something in the text box, the count above gets updated based on visible items in the list below.
However, this count is coming wrong, i.e. it is showing the previous count. Meaning when I have say 5 items in the list it is showing 7 (which was actually the previous count)
I have uploaded a screen cast in support. Hope this will help to understand the actual issue I have encountered.
Attachments (1)
Change History (7)
#4
@
9 years ago
- Milestone Awaiting Review
- Resolution → worksforme
- Status new → closed
@subrataemfluence Thanks for the bug report!
I tried to reproduce this in trunk and it looks like the theme browsing experience in the customizer is a bit refactored and no longer suffers from the bug you noted. Since its such a minor bug, I don't think its worth backporting to older releases.
Here is a screencast of searching themes in the current customizer in trunk (soon to be 4.9):
I really appreciate your efforts finding these bugs, I notice you are on a roll!
I am guessing you are testing on the last release version (4.8), can I suggest you check out and work from the github develop repository: https://github.com/WordPress/wordpress-develop - check this out and set up wordpress from the src directory - then you can develop your patches against trunk which is far more useful for core patches. (see here for some more details - https://make.wordpress.org/core/handbook/contribute/git/)
Thanks again.
#5
@
9 years ago
Thank you for your appreciation! I am testing things on 4.8.2.
From now on I will use https://github.com/WordPress/wordpress-develop. Thank you once again for providing me the resource.
One question though. I have seen the screencast and looks like this is already taken care of. WP team is awesome!
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Actual code in
wp-admin/js/customize-controls.jsWhile a Timeout wrapper with a
300 msdelay fixes the issue. I propose the following:renderScreenshots(); window.setTimeout(function(){ // Update theme count. count = section.container.find( 'li.customize-control:visible' ).length; section.container.find( '.theme-count' ).text( count ); }, 300);