Jump to:

1135 Posts in 1984 Topics by 403 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » rssFeed on 3.03

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 546 Views
  • cduff
    Avatar
    Community Member
    4 Posts

    rssFeed on 3.03 Link to this post

    I am attempting to upgrade my site from 2.4 to 3.03. I have everything working except the rss feeds. I am testing in a VM running LAMP. If i try my 2.4 site the rss feeds work. All I get from 3.03 is blank html page:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META content="text/html; charset=utf-8" http-equiv=Content-Type></HEAD>
    <BODY></BODY></HTML>

    isDev=1 doesn't return anything in addition to that.

    In order to test my rss code. I cleared out the database and did a fresh install of SS 3.03 and changed the Page.php adding this simplified version of my rss code:

    function rss(){
    $pages = Page::get()->limit(3);
    $feed = new rssFeed(
    $pages,
    $this->Link() . "rss",
    "Test Title"
    );
    $feed->outputToBrowser();
    }

    Going to the page/rss produces the same result as with my real information. Using php print, I have confirmed that $pages returns the pages and that $feed is created and I can pull information out of it manually. The failure seems to have something to do with the $feed->outputToBrowser().

    Any ideas what might be wrong? Or, what I can test?

  • cduff
    Avatar
    Community Member
    4 Posts

    Re: rssFeed on 3.03 Link to this post

    Update.

    The rss function is not returning a blank html document, IE was inserting that. After testing with other browsers, it returns a totally blank page. isDev=1 still produces nothing.

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: rssFeed on 3.03 Link to this post

    You'll need to update $feed->outputToBrowser(); to return $feed->outputToBrowser();

    http://doc.silverstripe.org/framework/en/reference/rssfeed for documentation on creating an RSS feed.

  • cduff
    Avatar
    Community Member
    4 Posts

    Re: rssFeed on 3.03 Link to this post

    Thank you very much. I can hardly believe I missed that.

    546 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.