[wp-trac] [WordPress Trac] #38563: Theme installed state does not persist after installation and refined search
WordPress Trac
noreply at wordpress.org
Sun Oct 30 00:16:27 UTC 2016
#38563: Theme installed state does not persist after installation and refined
search
----------------------------+-----------------------------
Reporter: ovann86 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: trunk
Severity: normal | Keywords:
Focuses: administration |
----------------------------+-----------------------------
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.
e.g.
{{{
_wpThemeSettings.installedThemes.push( response.slug );
}}}
Attached patch with how I would see this being done.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38563>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list