Needs work
Project:
Views Saved Searches
Version:
7.x-1.0-beta2
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
29 Oct 2010 at 11:09 UTC
Updated:
18 Apr 2016 at 06:05 UTC
Jump to comment: Most recent
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
Comment #1
manuelBS commentedThis 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)
Comment #2
mstrelan commentedI think VSS needs to save the View URL as well, as the view could be a panel pane or embedded in a node etc.