Insert_View passing arguments with Exposed Filter
zlex - February 25, 2009 - 03:21
| Project: | Insert View |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I've noticed a weird phenomenon. Views seems to be sticking the $arg passed by insert_views onto the end of the URL whenever an exposed filter form is submitted. I don't know if this is because I have my argument at the beginning of the view (I had to apply a patch to Views to get it to work, see: http://drupal.org/node/180776), or not. Insert_view is passing a url like node/5801 to $views->$url and views is spitting out it's url as node/5801/$arg?filterX=Y
This creates a kind of compounding effect where everytime the form is submitted, the url grows and grows. /arg/arg/arg/arg...

#1
I applied a temporary fix for me, but I don't know if this is a good sol'n.
$url = $_GET['q'];if (!empty($url)) {
foreach ($view_args as $arg) {
$url = str_replace($arg, '', $url);
$url = rtrim($url, "/");
}
}
$view->url = $url;