[wp-trac] [WordPress Trac] #35106: Responsive images break uploads with full path stored in metadata

WordPress Trac noreply at wordpress.org
Thu Dec 24 06:06:02 UTC 2015


#35106: Responsive images break uploads with full path stored in metadata
--------------------------------------+------------------------
 Reporter:  SergeyBiryukov            |       Owner:  joemcgill
     Type:  defect (bug)              |      Status:  accepted
 Priority:  normal                    |   Milestone:  4.4.1
Component:  Media                     |     Version:  4.4
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------

Comment (by azaozz):

 Ran into another similar case on old multisite installs. The full path is
 stored again but instead of `wp-content/uploads`, there is `wp-
 content/blogs.dir/[random]/files`. This is handled by the previous row in
 wp_get_attachment_url():
 https://core.trac.wordpress.org/browser/tags/4.4/src/wp-
 includes/post.php?marks=4872#L4870. In our case it should be:
 {{{
 $file = str_replace( $uploads['basedir'], '', $file );
 }}}

 Seems we will have to cache both `basedir` and `baseurl` in
 `_wp_upload_dir_baseurl()`.

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


More information about the wp-trac mailing list