[wp-trac] [WordPress Trac] #23483: Incorrect image URL for subsites when using UPLOADS constant on multisite subdirectory installation

WordPress Trac noreply at wordpress.org
Fri Feb 15 18:56:55 UTC 2013


#23483: Incorrect image URL for subsites when using UPLOADS constant on multisite
subdirectory installation
------------------------------+--------------------------
 Reporter:  creativeinfusion  |       Type:  defect (bug)
   Status:  new               |   Priority:  normal
Milestone:  Awaiting Review   |  Component:  General
  Version:  3.5.1             |   Severity:  normal
 Keywords:                    |
------------------------------+--------------------------
 If the UPLOADS constant is used on a Wordpress Multisite installed to
 subdirectory, using subdirectory mode, then image URLs for subsites are
 incorrect.

 Example:
 WP MS installed to www.domain.com/wordpress, subdirectory not subdomain
 UPLOADS set to 'assets'

 Main site uploads images to /wordpress/assets/...
 Main site image URL is www.domain.com/wordpress/assets/...

 Create subsite called 'subsite';
 Subsite uploads images to /wordpress/assets/sites/2/...
 Subsite image URL is www.domain.com/uk/assets/sites/2/... when it should
 be www.domain.com/assets/sites/2/...


 This is because wp_upload_dir() uses get_option('siteurl') to derive the
 URL. It is probably right for subdomain multisite but wrong in this use
 case.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23483>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list