WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11179 closed defect (bug) (fixed)

get_term_link returns a bad link for custom taxonomies

Reported by: bookchiq Owned by: filosofo
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.8.5
Component: Taxonomy Keywords:
Focuses: Cc:

Description

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

Change History (3)

comment:1 bookchiq4 years ago

  • Cc bookchiq added
  • Version set to 2.8.5

Further testing reveals this to only be an issue when using the default (non-pretty) permalink settings.

comment:2 ryan4 years ago

See also #11061

comment:3 ryan4 years ago

  • Milestone changed from Unassigned to 2.9
  • Resolution set to fixed
  • Status changed from new to closed

[12229]

This fixes part of the problem. A pretty permalink (broken or otherwise) shouldn't be returned when using default links. We'll address that in #11061.

Note: See TracTickets for help on using tickets.