Was the original error before adding ob_clean();
the same as the one now?
This feed does not validate.
line 1, column 1: Blank line before XML declaration
Like it says in that trac issue, this is caused by a plugin or theme. The best thing to do would be to disable your plugins then, if the problem clears up, reactivate them one by one until you narrow down which one is causing the problem. If it’s not a plugin, you can then check the theme by temporarily switching over the Twenty Eleven.
If adding ob_clean;
works for you, there’s nothing saying you can’t use it. Just be aware that future updates can/will overwrite your change and that the underlying problem in one of your plugins or your theme still exists.
The text/html
issue is actually fairly minor. While it’s best to try and find out what’s causing that specific problem, it won’t keep your feed from working or validating. Actually, even the whitespace problem, while it does prevent validation, is such a common problem that most feed readers will overlook it. For example, FeedBurner doesn’t seem to have an issue with your feed as it’s still properly updating.
You can certainly try that plugin. However, looking at the code of it, all it seems to do is replace wp-blog-header.php
with it’s own version. And the only difference between its version and the core version is the addition of ob_start();
and ob_end_clean();
. The code is also a bit funky in places. For example, it doesn’t use nonces for the form on its admin page. Also, like with your current solution, the underlying cause of the problem would still exist.
Okay, they seem to work but occasionally stop working – I cannot recognize the reason for this.
Are you doing anything at all that might affect it? It could be that the issue is in a part of a plugin’s code that only runs under certain circumstances.