[wp-trac] [WordPress Trac] #11179: get_term_link returns a bad link for custom taxonomies

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 19 00:44:21 UTC 2009


#11179: get_term_link returns a bad link for custom taxonomies
--------------------------+-------------------------------------------------
 Reporter:  bookchiq      |       Owner:  filosofo  
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  Taxonomy      |     Version:            
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------
 When I create a list of custom taxonomy members in the Loop using
 get_the_term_list, the links that are created are missing a slash.

 I've tracked this back to the get_term_link function, specifically the
 following line:
 {{{
 $termlink = get_option('home') . user_trailingslashit($termlink,
 'category');
 }}}

 As best I can figure, this ''should'' read:
 {{{
 $termlink = get_option('home') . '/' . user_trailingslashit($termlink,
 'category');
 }}}

 More details on how this shows up...[[BR]]
 * My base URL: http://192.168.2.99/wp [[BR]]
 * The taxonomy I'm testing: colors[[BR]]
 * The term I'm testing: brown[[BR]]
 * The bad URL produced by get_term_link:
 http://192.168.2.99/wpcolors/brown [[BR]]
 * The URL that should be produced: http://192.168.2.99/wp/colors/brown

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


More information about the wp-trac mailing list