Opened 10 years ago
Last modified 5 years ago
#30905 assigned defect (bug)
Theme Preview - Not working preview when front page setting
Reported by: | gqevu6bsiz | Owned by: | stevenkword |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.1 |
Component: | Canonical | Keywords: | |
Focuses: | Cc: |
Description
I'm sorry if there are already ticket for same problem.
Preview is not working well (not live preview/customizer).
Is this a bug? or specification?
Steps to reproduce:
- Settings to Front page(anyting page) and select the A static page of Front page displays of Reading of Settings.
- Access the Themes screen of Appearance with Editor(Editor already have capability to switch_themes).
- Click to the preview button of per not activated themes.
Tested in: Google Chrome 39.0.2171.95 m
And I think this happen is affect to following.
wp-includes/canonical.php line 48 - 54
Theme preview is not have post ID. But that it become to have post ID after the Front page settings.
And I have tentatively avoiding the problem in this way.
function test_redirect_canonical( $redirect_url , $requested_url ) { if( get_query_var( 'preview' ) && !empty( $_GET['template'] ) && !empty( $_GET['stylesheet'] ) && !empty( $_GET['preview_iframe'] ) ) { if( current_user_can( 'switch_themes' ) ) { $redirect_url = false; } } return $redirect_url; } add_filter( 'redirect_canonical' , 'test_redirect_canonical' , 10 , 2 );
Change History (2)
Note: See
TracTickets for help on using
tickets.
This looks like to be capabilities related.
Steven has agreed to look into it.