Opened 12 years ago
Last modified 5 years ago
#21700 new defect (bug)
Problem obtaining the Feed of an archive of tag “RSS”
Reported by: | xavivars | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4.1 |
Component: | Canonical | Keywords: | needs-testing needs-patch |
Focuses: | Cc: |
Description
I'm using RSS as a tag for some of my blog posts, and I was using them without any problem.
myblog.com/tag/rss/
But I've just realised that Google Webmaster Tools gives me some related errors.
The issue is this: when trying to retrieve the feed of this tag, from
myblog.com/tag/rss/feed/
it gets redirected to
myblog.com/tag/feed/
And this gives an error.
Attachments (4)
Change History (20)
#2
@
12 years ago
A workaround is to disable canonical redirection for tag feeds:
function disable_canonical_redirection_for_tag_feeds() { if ( is_feed() && is_tag() ) remove_action( 'template_redirect', 'redirect_canonical' ); } add_action( 'wp', 'disable_canonical_redirection_for_tag_feeds' );
#3
@
12 years ago
Thanks for the workaroud.
Do you know how is the process to fix this bug? It's the first time I submit one, and I'm not sure how does it work.
I mean, a developer has to assign the ticket to himself?
#4
@
12 years ago
Not necessarily, anyone can write a patch.
However, the issue seems tricky and will require unit test coverage:
http://make.wordpress.org/core/handbook/automated-testing/
#7
@
12 years ago
- Keywords has-patch needs-testing added; needs-patch removed
This is not just tags / tax, it's any query var that matches a feed slug, my patch addresses them. Attached.
#10
@
11 years ago
- Milestone changed from Future Release to 3.7
It seems that/tag/rss/feed/
works now in trunk, but /tag/rss/feed
breaks on redirection. My patch is refreshed, makes /tag/rss/feed
redirect to /tag/rss/feed/
properly
#11
@
11 years ago
test.21700.1.diff adds 4 tests for using tag's with the same name as feed names. hmm, wondering if it needs a test with custom feed names too.
The tests indicate that the comment of wonderboymusic is correct. His patch doesn't fix the tests though.
#13
follow-up:
↓ 15
@
11 years ago
Unfortunately the problem is more extensive so the current patch isn't enough. This is because stripping occurs for more than just feeds. For example, /tag/rss/page/2/
becomes /tag/page/2/
with and without the patch.
#14
@
11 years ago
tests.21700.2.diff adds the test duck_ suggested.
#15
in reply to:
↑ 13
@
11 years ago
- Keywords needs-unit-tests removed
- Milestone changed from 3.7 to Future Release
Replying to duck_:
Unfortunately the problem is more extensive so the current patch isn't enough. This is because stripping occurs for more than just feeds. For example,
/tag/rss/page/2/
becomes/tag/page/2/
with and without the patch.
Same for "feed", "rss2", "rdf", and "atom" tags.
Caused by stripping feed endings in
redirect_canonical()
:http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/canonical.php#L221
Related: [9697] (for #8076), [10505] (for #8642).