Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#7044 closed defect (bug) (fixed)

get_tag_feed_link() doesn't add slash

Reported by: scribu's profile scribu Owned by: mtekk's profile mtekk
Milestone: Priority: normal
Severity: normal Version: 2.5.1
Component: General Keywords: feed, tag, permalinks
Focuses: Cc:

Description

This error occurs when (almost) pretty permalinks are used and there is no trailing slash: get_tag_feed_link() doesn't add a slash before 'feed'.

Example:

Permalink struncture: /%category%/%postname%.html

Tag url: http://example.com/tag_base/tag

Tag feed: http://example.com/tag_base/tagfeed

Change History (10)

#1 @Viper007Bond
18 years ago

  • Milestone 2.5.2 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Add a trailing slash to your permalink structure at Settings -> Permalinks. WordPress (including get_tag_feed_link()) generates URLs based on your preference set there.

#2 @Viper007Bond
18 years ago

And if you wish to use a structure without a trailing slash (as you are with .html), you'll just need to add the slash manually when you want a trailing slash.

#3 follow-up: @DD32
18 years ago

I dont agree with that Viper007Bond.

You are correct that it uses that, And if you want a slash on the end of the url, then it needs to be set

However, In the permalink structure given, you do not want a trailing slash, and you do want a slash before any suffix's which are applied.

Ie. In this case, The missing slash is: Tag feed: http://example.com/tag_base/tag'''/'''feed

#4 @scribu
18 years ago

  • Milestone set to 2.5.2
  • Resolution worksforme deleted
  • Status changed from closed to reopened

I agree with DD32, and would like to mention that get_category_feed_link() works without a trailing slash in the permalink structure.

#5 in reply to: ↑ 3 @Viper007Bond
18 years ago

Replying to DD32:

You are correct that it uses that, And if you want a slash on the end of the url, then it needs to be set

However, In the permalink structure given, you do not want a trailing slash, and you do want a slash before any suffix's which are applied.

Oh, I'm sorry. I misread the ticket. I thought he was talking about the very end slash.

You're completely right. It should trailingslashit() rather than the "maybe" version.

My apologies.

#6 @guillep2k
18 years ago

  • Cc guillep2k removed

Please don't add my name to Cc: without at least a word on what do you expect from me. Thanks.

#7 @ryan
18 years ago

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

(In [8000]) Fix slashing in tag feed link. fixes #7044 for trunk

#8 @ryan
18 years ago

(In [8001]) Fix slashing in tag feed link. fixes #7044 for 2.5

#9 @ryan
18 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

#10 @scribu
17 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.