0

Here is my site. According to the WordPress codex, my comments feed should be http://oldmankit.com/comments/feed/. Indeed, every post has that link in its header. However, it's broken. If you click on that link, you'll see that loading it returns a completely blank page.

My first question is, can anyone help me work out why it's broken?

Second, is there a good reason to keep the comments feed? Obviously the posts feed is important for a blog, but a comments feed?

4
  • You comment feed link works fine.
    – Wyck
    Commented Jul 7, 2013 at 3:40
  • Your page source is showing the right link though I, even can't get access to your comment feed. Can't understand why? Please make sure, your functions.php consists a code like this: add_theme_support( 'automatic-feed-links' ); Commented Jul 7, 2013 at 6:05
  • 1
    Does any post on your site actually have any comments? It can't show them if it doesn't have anything to show.
    – Otto
    Commented Jul 7, 2013 at 8:21
  • I'm embarassed to say that @Otto is right. I had a complete overhaul of the site (after getting hacked) and lost all the comments as I built the database from scratch. I just put one up and yes, now it's working. Commented Jul 8, 2013 at 8:33

2 Answers 2

1

A "feed" is just another view of the site, really. If there's no matching items, then you'll get a 404 and an empty "view". This view can be expressed as a "no items found" on the front end of the site, while it will be an empty feed if looking at a feed view.

Since you had no comments, the query matched nothing, resulting in a 404 header status and an empty feed (which was a correct feed and viewable if you did a view-source on it).

0

The problem was that there were no comments on the whole site. Adding a comment resolved the problem.

(Thanks to @Otto for this answer.)

4
  • That's peculiar behavior... I would expect feed with no items rather than 404.
    – Rarst
    Commented Jul 8, 2013 at 9:57
  • It doesn't actually display a 404 page, but I found the problem when using Xenu link sleuth, which detects 404s I think. (I'm not sure.) Commented Jul 9, 2013 at 4:31
  • @Rarst Any main query which results in no results causes a 404 status header to be set. It will still produce a normal empty feed for the content, but the status of the page will be 404. If this was not a feed request, then it would also set is_404 and cause the theme to load the 404.php file.
    – Otto
    Commented Jul 9, 2013 at 6:09
  • That's weird, because I actually got front-end 404 when checking out feed link in question back then. Never mind, probably some glitch...
    – Rarst
    Commented Jul 9, 2013 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.