Broken RSS feeds in CMSB

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 28, 2011   (RSS)

By sidcam - February 27, 2011

I just discovered my RSS feeds were broken. I was getting the error messages at the bottom of this post when trying to view them in a browser or load them to my.yahoo, google, etc.

I went back and checked and I've followed your example (http://www.interactivetools.com/docs/cmsbuilder/rss_feeds.html) perfectly. They also worked when originally posted to my site.

However once I removed the top line declaration statement: <?php header('Content-type: application/xml; charset=utf-8'); ?><?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>

The pages loads normally again- which seems wrong because I thought the declaration statement was required.

Thoughts?

Sid

Error Message from FireFox:

XML Parsing Error: not well-formed
Location: http://site.com/rss/rss.xml.php
Line Number 1, Column 45:<?xml version="1.0" encoding="UTF-8"?>Couldn't start session! 'session_start(): Cannot send session cache limiter - headers already sent (output started at /<my-path>/rss.xml.php:1)'!
--------------------------------------------^

Error Message from Explorer:



The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the [url "javascript:location.reload()"]Refresh[/#0066cc][/url] button, or try again later.


Invalid at the top level of the document. Error processing resource 'http://site.com/rss/rss.xml...<?xml version="1.0" encoding="UTF-8"?>Couldn't start session! 'session_start(): Cannot send session cache limiter - he...

Re: [sidcam] Broken RSS feeds in CMSB

By Dave - February 27, 2011

Hi Sidcam,

The "headers already sent" error usually happens when you have whitespace or HTML before the "require_once" line. Remove that if possible or attach your viewer php file and we'll take a look.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [sidcam] Broken RSS feeds in CMSB

By Dave - February 28, 2011

Great! Glad to hear it's working. Let us know if you need anything else. :)
Dave Edis - Senior Developer
interactivetools.com