Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save junaidpv/3c179870456e024facce to your computer and use it in GitHub Desktop.

Select an option

Save junaidpv/3c179870456e024facce to your computer and use it in GitHub Desktop.
Views forms are settings form's action URL from view display's configured URL. This make problems if menu got altered and view display got displayed on different path. This still incomplete and a try.
diff --git a/views.module b/views.module
index f46564c..ac70d40 100644
--- a/views.module
+++ b/views.module
@@ -1807,7 +1807,7 @@ function views_form($form, &$form_state, $view, $output) {
$form = array();
$query = drupal_get_query_parameters($_GET, array('q'));
- $form['#action'] = url($view->get_url(), array('query' => $query));
+ $form['#action'] = url(request_path(), array('query' => $query));
// Tell the preprocessor whether it should hide the header, footer, pager...
$form['show_view_elements'] = array(
'#type' => 'value',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment