Hi all,

i have problems with the xml validation of my rss feeds.
If you click on the rss button in the navigation bar (firefox + explorer7) tring to add the following link: http://www.verdesperanza.net/news/?q=rss.xml

you'll display an error.

I tried to go to the feedvalidator.org to discover the problem in the sintax and it seems to be a problem at line 3

the result is:
line 3, column 0: XML parsing error: :3:0: xml declaration not at start of external entity

i think it's something connected with the fact that my host does not support mbstring but it has always worked since one year...

How can I solve that problem?
How can I manually edit the xml in order to solve the question?

Comments

yelvington’s picture

All your Drupal pages are showing up with two blank lines at the top, including your RSS feeds and your HTML output. This causes XML parsers to barf, but it doesn't bother HTML rendering.

Since your robots.txt file and your images do not suffer from this problem, it's probably a Drupal issue and not a webserver configuration problem.

The RSS feeds don't pass through the template engine, so the problem is unlikely to be there.

I would suspect that you may have edited a module somewhere, inserting blank lines before page rendering.

Piattaforma’s picture

Yes you're right. The first thing I did was disable all new modules i installed in theese last days.
But the problem persists. (I've searched for mysql entries too... sometimes my db lets the stuff around...)

I'm definitely quite sad....
any other tip is definitely appreciated

jacquesm’s picture

which was caused by a trailing linefeed at the end of a php file, possibly one or more modules dont end on ?> but have ?>\n\n or something to that effect. It is not really neccesary to end a module on ?>, quite possibly you're better off without that to avoid this subtle problem.

also some editors 'help' by adding a trailing linefeed at the end of a file that does not end on one, so if you open a file that ends on ?> without a linefeed it may add one.

if you have modified 'stock' module files then that would be the first place to look.

Piattaforma’s picture

The problem is with the taxonomy module.
Unbelievable but (dont know how dont know when) it has been canged.
Now I have a problem:
If I "uninstall" the module the feed works.... if I "reenable" it comes back to the trouble...

I have (obviously) modified the taxonmy module with the problem (2 lines white on the top)

Now I'll try to reinstall the module downloading it from the repository.

UPDATE:
solved it...
thanx to everybody!!! great help.. i really appreciate you

mgifford’s picture

This is a common enough problem. What's the easiest way to track down the culprit module that is spitting out the space?

Wouldn't it just make sense to trim() the results spit before printing the content:
http://openconcept.ca/recent_news/feed

Mike
--
OpenConcept | SEO | Tech | Screencasts