[wp-trac] [WordPress Trac] #36531: Default image size medium_large is not generated

WordPress Trac noreply at wordpress.org
Fri Apr 15 02:39:23 UTC 2016


#36531: Default image size medium_large is not generated
--------------------------+-----------------------------
 Reporter:  Indent        |       Owner:  joemcgill
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  4.6
Component:  Media         |     Version:  4.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  administration
--------------------------+-----------------------------
Changes (by joemcgill):

 * keywords:   => has-patch
 * status:  reviewing => accepted
 * milestone:  Awaiting Review => 4.6


Comment:

 Looks like any time the media options are saved (wp-admin/options-
 media.php) the values for `medium_large_size_h` and `medium_large_size_w`
 are being set to `null` because no value for that option exists in the
 `$_POST` request. The problem is in this section of `options.php`:


 {{{
 $value = null;
 if ( isset( $_POST[ $option ] ) ) {
         $value = $_POST[ $option ];
         if ( ! is_array( $value ) )
                 $value = trim( $value );
         $value = wp_unslash( $value );
 }
 update_option( $option, $value );
 }}}


 [attachment:36531.diff] removes `medium_large_size_h` and
 `medium_large_size_w` from the whitelist of media options that can be
 updated so this won't happen going forward, but we would still need to run
 a DB routine to reset this option if it has been set to null.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36531#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list