Make WordPress Core

Opened 9 years ago

Closed 4 years ago

#33253 closed defect (bug) (wontfix)

Some admin buttons not styled correctly in IE9 when not using post-thumbnails

Reported by: kurdt_the_goat's profile kurdt_the_goat Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2.3
Component: Post Thumbnails Keywords:
Focuses: Cc:

Description

When add_theme_support('post-thumbnails') is not implemented, some admin buttons have style issues (no border/bg) in IE9. Some i've noticed are:

  • Add Media above wysiywg
  • Insert buttons bottom right of Add Media modal (buttons are essentially invisible once a file has been selected since text is white/no bg)

The same thing happens for custom post types that don't support 'thumbnail'

Attachments (1)

ie9 button style issues.jpg (203.6 KB) - added by kurdt_the_goat 9 years ago.

Download all attachments as: .zip

Change History (4)

#1 @ZZmmrmn
9 years ago

If a post type doesn't have support for thumbnails this same issue will apply to just that post type. Additionally if wp_enqueue_media is called during the admin_enqueue_scripts hook the media library modal styles will break.

Steps To Replicate
With a clean install of 4.2.4 using the 2015 theme and viewing in IE9.
Add to functions.php

register_post_type(
    'demo',
    array(
        'labels' => array(
            'name' => 'Demo Type',
            'singular_name' => 'Demo Type',
        ),
        'public' => true,
        'supports' => array( 'title', 'editor' )
    )
);

The button styles on demo post edit pages will be broken.
If we add to functions.php

function enqueue_media( ){
    wp_enqueue_media( );
}
add_filter( 'admin_enqueue_scripts', 'enqueue_media' );

Now the styles for the Media Library modal will be broken on demo post edit pages.

Notes
When using plugins like ACF wp_enqueue_media is called on most edit screens resulting in broken Media Library modals.

wp-admin/edit-form-advanced.php calls wp_enqueue_media before admin_enqueue_scripts is triggered if support for thumbnails is true. This causes the buttons and media-view stylesheets to be loaded before the wp-admin stylesheet, resulting in the styles working correctly. Its when the buttons and media-view stylesheets are enqueued after the wp-admin stylesheet that things break.

As a work around you can move the wp-admin stylesheet to the end of the enqueue list by adding this to functions.php

function filter_styles_enqueue_order( $styles ){
    if( is_admin( ) ){
        unset( $styles[ array_search( 'wp-admin', $styles ) ] );
        $styles[] = 'wp-admin';
    }
    return $styles;
}

This ticket was mentioned in Slack in #core by flixos90. View the logs.


8 years ago

#3 @afercia
4 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

WordPress ended support for Internet Explorer versions 8, 9, and 10 with the 4.8 release. End of support was announced on April 23, 2017 which is more than 3 years ago. Thinking this ticket can be closed now.

Note: See TracTickets for help on using tickets.