Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#11061 closed defect (bug) (fixed)

Wrong term link when permalinks turned off

Reported by: scribu's profile scribu Owned by: ryan's profile ryan
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.9
Component: Permalinks Keywords: has-patch
Focuses: Cc:

Description

Site URL: http://localhost/wp

Permalinks: Default

Taxonomy: 'genre'

Expected result:

http://localhost/wp/?genre=jazz

Actual result:

http://localhost/wpgenre/jazz

Attachments (2)

term_links.diff (1.6 KB) - added by scribu 14 years ago.
11061.diff (593 bytes) - added by scribu 14 years ago.
remove double slash

Download all attachments as: .zip

Change History (13)

@scribu
14 years ago

#1 @scribu
14 years ago

  • Component changed from General to Permalinks
  • Owner set to ryan
  • Version set to 2.9

#2 @ryan
14 years ago

See also #11179

#3 @ryan
14 years ago

I think adding the slash to the add_permastruct() call will break pretty permas. The fix for #11179 should fix the slashing. That leaves returning pretty links when the crufty links should be returned. I think we can fix that by having get_extra_permastruct() return false if pretty links are not on, as is done with other get_*_permastruct calls.

#4 @ryan
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12230]) Don't return extra permastructs if pretty permalinks not turned on. Props scribu. fixes #11061

#5 @ryan
14 years ago

Try that out. Re-open if I messed it up. :-)

#6 @scribu
14 years ago

  • Keywords needs-patch added; has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Slight glitch:

Permalinks off: http://localhost/wp/?genre=jazz (ok)

Permalinks on: http://localhost/wp//genre/jazz/ (notice the double slash after /wp)

@scribu
14 years ago

remove double slash

#7 @scribu
14 years ago

  • Keywords has-patch added; needs-patch removed

#8 @scribu
14 years ago

$wp_rewrite->get_extra_permastruct($taxonomy); adds a slash at the beginning now, which is good.

That's what caused the extra slash.

#9 @scribu
14 years ago

  • Cc scribu@… added

#10 @bookchiq
14 years ago

  • Cc sarah@… added

#11 @ryan
14 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [12241]) Fix double slashing. Props scribu. fixes #11061

Note: See TracTickets for help on using tickets.