Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
mr.j CreditAttribution: mr.j commentedOh, 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.
Comment #2
nath CreditAttribution: nath commentedI think the problem is also there when using the 2.x version.
Comment #3
catchComment #4
catchConfirmed 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.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedThat 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.
Comment #6
erikwillemse CreditAttribution: erikwillemse commentedHi 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
Comment #7
ridefree CreditAttribution: ridefree commentedjust 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.
Comment #8
ridefree CreditAttribution: ridefree commentedjust 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 ...
Comment #9
lavamind CreditAttribution: lavamind commentedA 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.
Comment #10
EvanDonovan CreditAttribution: EvanDonovan commentedGoing 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?
Comment #11
EvanDonovan CreditAttribution: EvanDonovan commentedAs for me, here's how I solved this issue:
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.
Comment #12
julien.reulos CreditAttribution: julien.reulos commentedSo I just add a new custom content in a pane from my homepage panel with:
The PHP snippet put a RSS feed icon in the page and activate the web browser rss icon too.
Comment #13
japerry