Make WordPress Core

Opened 8 years ago

Last modified 3 years ago

#38563 reviewing defect (bug)

Theme installed state does not persist after installation and refined search

Reported by: ovann86's profile ovann86 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-patch needs-refresh needs-testing
Focuses: javascript, administration Cc:


After installing a theme an 'Installed' flag is displayed above the theme.

If you refine the search results, and the same theme is in the results the theme does not display the 'Installed' flag.

Steps to reproduce:

(Exact steps assumes the WordPress installation does not have the theme Twenty Twelve installed)

  1. In the WordPress Administration, go to Appearance -> Themes -> Add New
  2. Search for 'Twenty'
  3. Install theme 'Twenty Twelve' and wait for installation to complete. The 'Installed' flag will appear above the installed theme.
  4. Refine search results by changing search term to 'Twenty T'
  5. The theme 'Twenty Twelve' will appear in the search results but will not have the 'Installed' flag.

If you attempt to install the theme again you receive an error message stating 'Installation failed: Destination folder already exists.'

The specifics ...

Installed themes are stored in a JavaScript array - _wpThemeSettings.installedThemes

The array is being created when the page loads and needs to be updated when a theme is installed so that new search results (which use Ajax and do not reload the page) have the complete list of installed themes.

The solution ...

Once the installed theme is successfully installed, push the theme slug into the array.


_wpThemeSettings.installedThemes.push( response.slug );

Attached patch with how I would see this being done.

Attachments (1)

38563.patch (461 bytes) - added by ovann86 8 years ago.
Proposed patch for 38563

Download all attachments as: .zip

Change History (6)

8 years ago

Proposed patch for 38563

#1 @ovann86
8 years ago

  • Keywords has-patch added

#2 @ocean90
8 years ago

  • Focuses javascript added
  • Owner set to swissspidy
  • Status changed from new to reviewing
  • Version trunk deleted

#3 @swissspidy
8 years ago

  • Milestone changed from Awaiting Review to Future Release

#4 @desrosj
5 years ago

  • Keywords needs-refresh needs-testing added

@ovann86 Are you able to refresh your patch to apply cleanly to the current trunk?

#5 @swissspidy
3 years ago

  • Owner swissspidy deleted
Note: See TracTickets for help on using tickets.