[wp-trac] [WordPress Trac] #24716: Grid view for the Media Library

WordPress Trac noreply at wordpress.org
Sun Jun 8 14:05:32 UTC 2014


#24716: Grid view for the Media Library
-------------------------------------+-------------------------------------
 Reporter:  alexvorn2                |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  4.0
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  ui, javascript,
  ui-feedback ux-feedback            |  administration
-------------------------------------+-------------------------------------

Comment (by SergeyBiryukov):

 [28682] broke inserting images from Media Library via the media modal on
 my install:

 {{{
 <br />
 <b>Warning</b>:  filesize() [<a
 href='function.filesize'>function.filesize</a>]: stat failed for
 H:\home\wordpress\trunk/wp-
 content/uploads/2008/06/2429111678_2ecb3abb93_b.jpg in
 <b>S:\home\wordpress\trunk\wp-includes\media.php</b> on line
 <b>2604</b><br />
 <br />
 <b>Warning</b>:  filesize() [<a
 href='function.filesize'>function.filesize</a>]: stat failed for
 H:\home\wordpress\trunk/wp-content/uploads/2008/02/catyeye.jpg in
 <b>S:\home\wordpress\trunk\wp-includes\media.php</b> on line
 <b>2604</b><br />
 }}}
 We don't store absolute file paths in `_wp_attached_file` since [8796],
 but I have a couple of files uploaded before 2.7, and now they have an
 invalid path, which apparently should be fixed on editing by
 [source:tags/3.9.1/src/wp-includes/post.php#L4571 wp_insert_attachment()].

 On a related note, `get_attached_file()` can return false since [20613],
 but we don't check for that here.

 Looks like we need a `file_exists()` check before calling `filesize()`:
 [attachment:24716.3.patch].

 However, that causes `'false'` string to be displayed as a file size:
 [attachment:24716.filesize.png]. The screenshot also shows an overlapping
 issue with Hello Dolly activated.

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


More information about the wp-trac mailing list