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.
I'm not sure it's an OG issue or Views.
1) In og_ghp_ron add filter Node:type
2) Expose the filter
3) Go to a group node, Select story and click apply
Instead of being redirected to example.com/node/xxx?type[]=story
you are redirected to example.com/?type[]=story
Comments
Comment #1
amitaibuIt happens when AJAX is disabled.
Comment #2
amitaibuI've investigated some more. In og_views_view_group() we have
$built = $view->preview('default', array($node->nid));
.However, since we are using the default view and not a page then Views doesn't get the node/% resulting with
example.com/?title=123
.A workaround that I found, is to create a page view (with path og_ghp) and to change
$built = $view->preview('page', array($node->nid));
Now the URL is resulting with example.com/og_ghp/1?title=123
However this is an ugly hack - any idea on how to make it nicer?
Comment #3
ultimateboy CreditAttribution: ultimateboy commentedConfirming this issue. A view with an exposed filter cannot be set as a group homepage unless ajax is enabled; otherwise, filtering the view using the exposed filter gives very undesired behavior.
Comment #4
grzegorz.bartman CreditAttribution: grzegorz.bartman commentedI solved this with form alter:
Comment #5
donquixote CreditAttribution: donquixote commentedHi. same behavior here.
Just enabled ajax, and now it works.
Still, would be nice if it can be fixed..
Comment #6
Grayside CreditAttribution: Grayside commentedWe use much the same trick, currently via Views Embed. Don't know if Views 3 offers a better trick.
Comment #7
amitaibuWe no longer have custom special code from Views provided by OG, so it doesn't apply to OG7
Comment #8
Grayside CreditAttribution: Grayside commentedComment #9
Grayside CreditAttribution: Grayside commentedhttp://drupalcode.org/project/og.git/commit/e19a9ff
Observed in testing that you can easily enter a confusing place if you have exposed filters that provide no results. #1429584: Support homepage views with no-result exposed filters