[wp-trac] [WordPress Trac] #25650: When switching between blogs, wp_upload_dir 'baseurl' and 'url' may be pointing to the current blog not the switched one

WordPress Trac noreply at wordpress.org
Fri Jan 8 21:53:31 UTC 2016


#25650: When switching between blogs, wp_upload_dir 'baseurl' and 'url' may be
pointing to the current blog not the switched one
--------------------------+------------------------------
 Reporter:  igmoweb       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Upload        |     Version:  3.6.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  multisite
--------------------------+------------------------------

Comment (by igmoweb):

 Hi, I attached a patch for a first approach to the problem (
 25650_approach_2.patch, forget about the first one). This was what I had
 in mind for this. Obviously, this is not fully working but it fixes the
 main problem.

 So the idea is to stop trusting WP_CONTENT_URL constant and add a global
 $wp_content_url (maybe a static one is better, not sure right now). The
 global is actually based on the constant so the user can still define it
 in some way. When a switch between blogs is made we can use this global to
 change the content URL. Right now, I'm just replacing the sites URLs, what
 can be bad but it's a start.

 A dev feedback would be handy in here.

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


More information about the wp-trac mailing list