[wp-trac] [WordPress Trac] #17669: URL is incorrect when trying to post media/image/audio/video

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 2 22:51:19 UTC 2011


#17669: URL is incorrect when trying to post media/image/audio/video
--------------------------+-----------------------------
 Reporter:  AllyUnion     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Post Types    |    Version:  3.1.3
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Server 1 is running http://www.example.com [[BR]]
 Server 2 is running blog.example.com (Word Press site)

 Server 1 is on our corporate infrastructure[[BR]]
 Server 2 is within the Amazon EC2 cloud.

 We generated ProxyPass rules using Apache to implement:

 ProxyPass /blog http://blog.example.com [[BR]]
 ProxyPassReverse /blog http://blog.example.com

 In our Word Press site configuration under Settings > General

 We defined
 WordPress address (URL) as "http://www.example.com/blog" and
 Site address (URL) as "http://www.example.com/blog"

 Any time we try to use Post > Add New Post then click on:

 Add an Image / Add Video / Add Audio / Add Media

 The sub-popup window links at the top for:[[BR]]
 From Computer[[BR]]
 From URL[[BR]]
 Media Library[[BR]]

 Are not linked properly. The links we have for them are something like:
 "/wp-admin/media-upload.php?post_id=207&type=image&tab=type"

 Which is not correct. It should be:
 "http://www.example.com/blog/wp-admin/media-
 upload.php?post_id=207&type=image&tab=type"

 If the siteurl is defined, then add_query_arg should rely on
 get_option('siteurl') to get the proper URL.

 I believe this is the fix but I am not familiar with the Word Press code
 enough to say this is the proper fix:

 http://pastebin.com/g3ryWZmD

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


More information about the wp-trac mailing list