Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#11061 closed defect (bug) (fixed)

Wrong term link when permalinks turned off

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

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 17 years ago.
11061.diff​ (593 bytes ) - added by scribu 17 years ago.
remove double slash

Download all attachments as: .zip

Change History (13)

@scribu
17 years ago

#1 @scribu
17 years ago

  • Component General → Permalinks
  • Owner set to ryan
  • Version → 2.9

#2 @ryan
17 years ago

See also #11179

#3 @ryan
17 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
17 years ago

  • Resolution → fixed
  • Status new → closed

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

#5 @ryan
17 years ago

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

#6 @scribu
17 years ago

  • Keywords needs-patch added; has-patch removed
  • Resolution fixed
  • Status closed → 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
17 years ago

remove double slash

#7 @scribu
17 years ago

  • Keywords has-patch added; needs-patch removed

#8 @scribu
17 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
17 years ago

  • Cc scribu@… added

#10 @bookchiq
17 years ago

  • Cc sarah@… added

#11 @ryan
17 years ago

  • Resolution → fixed
  • Status reopened → closed

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

Note: See TracTickets for help on using tickets.