In have one view in which i defined four pages with different paths.

When I register a search on a page with a specific path, accessing the saved search I always get the path of the first page (the one with the same name of the view).

I solved this problem changing the value in the field "display" of the table views_savedsearches: my opinion is thet the value actually stored can't be named diplay because it seems to be the view's name.

Here is the fix:

1. in function views_savedsearches_save_search_form put the correct value in the display field by using this code:

$form['variables']['display'] = array('#type' => 'hidden', '#value' => $view->display[$view->current_display]->display_options['path']);

2. in function _views_savedsearches_saved_searches_to_form_options load the correct value in the $options variable:

$options[$sid] = l($saved_search->name, $saved_search->display, array('attributes' => array('class' => $class), 'query' => $query));

Bye.

Comments

manuelBS’s picture

Version: 6.x-1.0-beta3 » 7.x-1.0-beta2
Issue summary: View changes
Status: Needs review » Needs work

This does not work if we have a view pane embeded into a panel as it will not redirect to the panel path but to a path containing the views pane display name which does not exist (need /projects/projects/ but get something like /panel_pane_5)

mstrelan’s picture

I think VSS needs to save the View URL as well, as the view could be a panel pane or embedded in a node etc.