Opened 3 years ago
Closed 3 years ago
#54878 closed defect (bug) (fixed)
Don't show links to the Customizer when installing themes using api.wordpress.org
Reported by: | antonvlasenko | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 5.9.3 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Themes | Keywords: | has-patch has-screenshots commit fixed-major |
Focuses: | Cc: |
Description (last modified by )
I found this while working on #54578.
Steps to reproduce the bug:
- Go to
Appearance -> Themes
page. - Click on the
Add New
button, then find theTT1
theme using the search functionality. - Install the theme.
Expected result:
The Live Preview
button is not displayed for block-based themes.
Actual result:
The Live Preview
button is displayed for block-based themes.
Also, the Customize
button is displayed for installed block themes when browsing the available themes. It also has to be removed.
Change History (16)
#2
@
3 years ago
@costdev
Thank you for the triage.
No, it's on the wp-admin/theme-install.php
page.
To see the Customize
button, install a block theme like TT1
from wordpress.org, then activate it.
Go to Appearance -> Themes
page.
Click on the Add New button
, then find the TT1
theme using the search functionality.
I've updated Steps to reproduce the bug
section.
This ticket was mentioned in PR #2349 on WordPress/wordpress-develop by anton-vlasenko.
3 years ago
#4
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/54878
#5
@
3 years ago
Steps to test this PR:
- Go to
Appearance
->Themes
page. - Activate the
Twenty Twenty-Two
theme (if it's not active). - Click on the
Customize
button for theTwenty Twenty-Two
theme. It should take users toSite Editor
. - Click on the
Add New
button, then search forTT1
theme. - Install the
TT1
theme but don't activate it. - The
Live Preview
button must not be displayed for theTT1
theme.
#7
@
3 years ago
Thanks for the patch, @antonvlasenko! tl;dr It appears that after the install action that the Live Preview button is not being removed, but is removed upon subsequent page loads.
Test Report
Env
- WordPress 6.0-alpha-52448-src
- Safari 15.3
- macOS 12.2.1 (Monterey)
- Theme: Twenty Twenty-Two
- Gutenberg 12.7.0-rc.1 ENABLED 🟢 and DISABLED 🔴
Steps to Test
- On Appearance > Themes activate "Twenty Twenty-Two" theme.
- Observe active theme's Customize button points to
/wp-admin/site-editor.php
(with Gutenberg:/wp-admin/themes.php?page=gutenberg-edit-site
). - Click Add New and search for "tt1" ("TT1 Blocks" theme).
- Click Install for "TT1 Blocks" theme.
- Observe Live Preview button is visible and links to
/wp-admin/customize.php?theme=tt1-blocks
. ❌ - Refresh page (Reload or repeat Steps 1-3).
- Observe Live Preview button is removed. ✅
Expected Results (✅/❌)
- In Step 4, it was expected that the Preview button would disappear after installation, but in Step 5 the button was replaced with Live Preview, pointing to the Customizer. ❌
- After a page refresh in Step 6, the Live Preview button was successfully removed from the theme buttons (Step 7). Before the patch, the button was still present, and linked to the Customizer. ✅
#8
@
3 years ago
Thank you so much for testing, @ironprogrammer!
I've fixed the issue you mentioned.
@costdev Would it be possible to move this track ticket to the 5.9.2 milestone, please?
This trac issue and #54578 (which is in the 5.9.2 milestone) are related, and both of them fix similar issues.
#9
@
3 years ago
- Keywords has-screenshots added; needs-testing removed
👍🏻 LGTM! The PR update has addressed the removal of the preview button immediately following installation of a block theme.
Test Report
Env
- WordPress 6.0-alpha-52448-src
- Safari 15.3 (w/ cleared cache)
- Chrome 98.0.4758.109
- macOS 12.2.1 (Monterey)
- Theme: Twenty Twenty-Two
- Gutenberg DISABLED 🔴
Steps to Test
- On Appearance > Themes activate "Twenty Twenty-Two" theme.
- Click Add New and search for "tt1" ("TT1 Blocks" theme).
- Click Install for "TT1 Blocks" theme.
- Observe the Preview button is removed, and not replaced with Live Preview. ✅
- Refresh page (Reload or repeat Steps 1-3).
- Observe Live Preview button is removed. ✅
Screenshots
On theme-install.php
, Preview and Live Preview buttons are removed after block theme installation.
#10
@
3 years ago
- Keywords commit added
- Milestone changed from 6.0 to 5.9.2
Thanks for the test reports @ironprogrammer!
@antonvlasenko Moving to the 5.9.2 milestone and flagging for commit
consideration.
For committers: This ticket's issue has been identified, reproduced, patched, tested, improved, tested and confirmed. No outstanding issues or newly introduced regressions have been identified.
peterwilsoncc commented on PR #2349:
3 years ago
#12
Committed in 567b2518f8d9207bc0da9c8f329fd969debdc2e2 (canonically https://core.trac.wordpress.org/changeset/52819)
#13
@
3 years ago
- Keywords fixed-major added
Committed in [52819] but waiting for trac to catch up:
Themes: Hide block themes' live preview link following installation.
Prevent the Customizer/Live Preview button from showing for installed block themes when on the theme installation page.
Props antonvlasenko, costdev, ironprogrammer.
Fixes #54878.
#14
@
3 years ago
- Milestone changed from 5.9.2 to 5.9.3
Moving to milestone 5.9.3 since we're about to release 5.9.2.
@antonvlasenko Thanks for opening this ticket!
Tested on trunk with the same results. Milestoning for 6.0.
In
wp-admin/themes.php
? If so, thisCustomize
button goes to the Site Editor for block themes, isn't that okay? Alternatively, it might be worth changingCustomize
toEdit site
in this context, for consistency with the Admin Bar, which changes fromCustomize
for classic themes toEdit site
for block themes.