The og_views module is currently forcing a feed onto the group homepage regardless of whether the group's homepage view actually has a feed display or not.

In the function "og_views_view_group" would it be possible to put a little check to see if the view has a feed or not, and then only call drupal_add_feed if it does?

Comments

Why is this drupal_add_feed necessary in the first instance? If you 'attach' a Feed display to the Default display of an og_ghp view won't the feed icon be displayed by Views RSS plugin anyway?

For example, I have a custom view og_ghp_mysite with two displays "Default" and "Feed". In the "Feed" display under "Feed Settings" I "Attach to ..." Default display. Views modules then adds a Feed icon link to the Default display. I then get two feed icons, one fixed by OG and one dynamically generated by Views.

It seems to me the fixed feed icon generated by OGs drupal_add_feed is unnecessary, rather the default view og.og_ghp_ron.view should be altered to attach the 'Feed' to the 'Default' display at the start i.e. delete drupal_add_feed from og_views_view_group, and modify default view og.og_ghp_ron.view feed setting (line 132 ish) from:

$handler->override_option('displays', array(
'default' => 0,
));

to

$handler->override_option('displays', array(
'default' => 'default',
));

and then let Views RSS plugin add the feed icon.

I've commented out the drupal_add_feed function in my install of og_views.module line 219, and I can attach feeds to the default display of OG home page using Views just fine. I'm using OG 6.x-2.0 and Views 6.x-2.8.

Status:Active» Needs review
StatusFileSize
new613 bytes

I agree. Basic atch attached.

Status:Needs review» Reviewed & tested by the community

Tested, working fine!
Don't replicate (and hard code) a feature that can be provided using other modules (Views in this case) :)

Thank you mrfelton

duplicate post

Not sure why the patch gave me some trouble, but the solution is good. We have been searching for a way to remove the RSS feed and this worked. I agree this feature should just be left up to views and not hard coded into this module.

Status:Reviewed & tested by the community» Needs review
StatusFileSize
new1.32 KB

I checked the patch, and while it failed to apply cleanly manually dropping the line was easy enough.

Unfortunately this patch does not update the existing og_ghp_ron view to attach the RSS Feed to the Default display so Views actually does handle the RSS feed icon. Attached patch adds that in to preserve consistency.

If someone else could just confirm all's well and set to RTBC I will commit.

Status:Needs review» Postponed
StatusFileSize
new1.89 KB

Looked a little longer, realized there was a now retired hook_menu entry implied in going to a proper use of Views to attach the RSS feed. However, we now have another problem--by skipping hook_menu() and it's very nice ability to enforce node_view() permission to see the RSS feed, the feed is now "unrestricted" access. This is not tenable.

That makes this issue postponed on #1429016: OG Access integration with OG Views, though as an alternative hook_menu_alter() could be used to adjust access to the RSS feed in this case, that's a very lonely workaround.

Marked #659476: Disable feed as duplicate of this issue.

StatusFileSize
new474 bytes

Patch against 2.4.