[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 19:34:53 UTC 2013


#23483: Incorrect image URL for subsites when using UPLOADS constant on multisite
subdirectory installation
------------------------------+------------------------------
 Reporter:  creativeinfusion  |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Multisite         |     Version:  3.5.1
 Severity:  normal            |  Resolution:
 Keywords:                    |
------------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> 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.

New description:

 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/... [[BR]]
 Main site image URL is www.domain.com/wordpress/assets/...

 1. Create subsite called 'subsite';
 2. Subsite uploads images to /wordpress/assets/sites/2/...
 3. 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#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list