[wp-trac] [WordPress Trac] #18910: get_blog_details query alteration for root-relative url plugin support...

WordPress Trac wp-trac at lists.automattic.com
Tue Oct 11 23:39:05 UTC 2011


#18910: get_blog_details query alteration for root-relative url plugin support...
-------------------------+-----------------------------
 Reporter:  MarcusPope   |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Multisite    |    Version:  3.2.1
 Severity:  normal       |   Keywords:  has-patch
-------------------------+-----------------------------
 After reading through this ticket
 http://core.trac.wordpress.org/ticket/17048 and all of its referenced
 links / discussions I decided to write my own plugin to do root-relative
 urls.

 However there is a core issue that prevents such a plugin from working
 when using path-based MU installs (versus subdomain installations where as
 it stands cannot support root relative urls... yet.)

 Looks like the logic for path-based site detection was copied wholesale
 from the subdomain-based detection logic in the if-block just below it.

 I don't see a need to query both the path and the domain if the domain
 isn't going to change for a MU path-based install.  This fix proposes
 checking explicitly for is_subdomain_install == false and then only
 querying the database on the path column.

 If this patch doesn't account for some scenario in which path-based
 installs could actually have multiple domain addresses in the database
 then please add a filter to the $fields variable so that a plugin can
 handle the variance there.

 I'm not here to start a root-relative vs absolute uri debate (I'm saving
 that for another day ;)  But basically the recommendation from the WP Core
 team is to do this in a plugin, yet we can't until this is fixed.

 Thanks!
 -Marcus

 (ps - if you'd like to have the absolute uri / relative root debate I'm
 totally game! just email me :D)

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


More information about the wp-trac mailing list