When you set panels to be your site's homepage, the default auto-discoverable RSS feed does not get added to the HEAD of the document.

To compare:
- Visit your site's homepage panels and notice your browser (I'm using safari) does not auto detect a feed.
- Now navigate manually to /node (the default home page) and see that it does.

It would be even better if the feed was the content of the panels rather than just the default nodes that have been promoted to the front page. But that's another issue: http://drupal.org/node/202904

Comments

mr.j’s picture

Oh, and I know that the 1.2 branch will never be updated to fix this, but I've posted it in case the same problem exists in panels 2.
Perhaps someone using version 2 could test this.

nath’s picture

I think the problem is also there when using the 2.x version.

catch’s picture

Version: 5.x-1.2 » 5.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)
catch’s picture

Confirmed in panels 2:

<link rel="alternate" type="application/rss+xml" title="example.com RSS" href="http://example.com/rss.xml" />

Doesn't appear if the front page is set to a panel. Now, if someone could confirm if this issue is specific to panels, or if it also appears when the front page is set to a node, view etc. that'd be helpful.

merlinofchaos’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

That information is provided automatically by the function 'node_page_default' when viewing the 'node' page; this means that any front page that is not 'node' pretty much will not have this feed added.

One way to work around this problem is to somehow put the frontpage view into your panel, which comes with a frontpage feed and will place this RSS feed as well. Without that, this is best fixed with a small module that will do this via hook_menu or somesuch, as it does not make sense to have this code in Panels directly.

erikwillemse’s picture

Hi all,

I am having the same issue of having no RSS when using panels for my front page. I am using Drupal 5.7 and Panels 5.x-1.2.

So, I have followed the suggestion of having (a variant of) the frontpage view into my frontpage panel. And this works. But not to the max. The problem is that the generated RSS feed goes to www.mysite.com/2008/7/feed. As I change my frontpage every week to a new panel with a different configuration, the feed for next week will point to www.mysite.com/2008/8/feed.

Of course this is not the purpose of RSS as it should be pointing to the same location for every panel.

So this is no work around.

With respect to the small module that should do the fix, does anybody have idea on how to tackle this?

Still, I believe this should be part of the panels module itself. I mean, panels are intended for front pages, right? And when the nodes on the front page change (e.g. for a weekly edition), the RSS feed should be updated.

Any ideas?

Thx.

Erik

ridefree’s picture

just to add some comments to this...

my site has panels on the front page, and the feed is a feedburner feed.
it is 5.x

putting frontpage view somehow in the panel doesn't fix this as I need the feedburner feed (which I have as rss.xml using the feedburner module) ... jsut need to get taht feed to autodiscover

will try and post back if I figure it out.

ridefree’s picture

just posting back to say I figured it out with the help ...

http://drupal.org/node/190047

added a custom content block in the panel and added the code indicated for rss.xml

make sure to put the input format as php ... and you should be good ...

lavamind’s picture

A more elegent way to add an RSS feed for any Panels page (not just on the frontpage) is to add a custom content area in with this : <?php drupal_add_feed('my/feed/path','Feed title'); ?> Of course, the PHP interpreter filter must be enabled and selected for this content.

That said, I still believe there should be some way to specify a page feed URL for a Panels page. A front page panel is one use case. Another would be a panel page with some custom (static) content and a single view. We could expect the site's administrator to want the feed page to expose that View's Feed display.

That said, it's true that Panels shouldn't itself try to create or even discover which feed is needed.

Instead, panels page could expose a simple field in the node edit form where a feed path could be entered. That feed path would then be used when rendering the panels page.

EvanDonovan’s picture

Title: No RSS when using panels for home page » Provide an option to choose a global RSS feed for a panel (esp. when using Panel as a homepage)
Version: 5.x-2.x-dev » 6.x-3.x-dev
Category: bug » feature
Status: Closed (won't fix) » Active

Going off #9: I think it would be great if there were a simple way to specify, probably on the General settings for a Panel, that it should have a feed associated with it. Just a field that you could input the name of the feed into would be sufficient.

Is there any chance of that, or still won't fix?

EvanDonovan’s picture

As for me, here's how I solved this issue:

/**
 * Implements hook_init().
*/
function shoresmods_init() {
  if(drupal_is_front_page()) {
	  drupal_add_feed('rss.xml', 'The Latest from Shores Institute');
	}
}

Thanks to lavamind for the drupal_add_feed() function; I didn't know about that. I thought that adding it in hook_init() in a custom module was cleaner than on the panel itself though.

julien.reulos’s picture

So I just add a new custom content in a pane from my homepage panel with:

drupal_add_feed('rss.xml', 'General RSS feed');

The PHP snippet put a RSS feed icon in the page and activate the web browser rss icon too.

japerry’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)