Using the new views display field control (that allow you to show or mask fields), I wanted to use Views Saved searche but got stuck with an issue : filters not saved by views saved search for this controller.
Looking for what is saved, everything is here. But what is display misses the key of the array.
Filters of views display field control is like that : control_fields[nid]=nid&control_fields[uid]=uid
Issue is that Views Saved searches renders control_fields[]=nid&control_fields[]=uid. Indeed, line 594 of views saved search module, we have :
$query .= drupal_urlencode($filter_name) . drupal_urlencode('[]') .'='. drupal_urlencode($value);
If we change it into :
if ($filter_name =='control_fields') {
$query .= drupal_urlencode($filter_name) . drupal_urlencode('['.$value.']') .'='. drupal_urlencode($value);
}
else {
$query .= drupal_urlencode($filter_name) . drupal_urlencode('[]') .'='. drupal_urlencode($value);
}
it works well.
Question is whether changes should be brought to Views savedsearches or views display control field istelf as having twice the parameter does not seem to be of interest.
See #1131846: Should we change the way views field contro dispaly handles parameters ?
Comments
Comment #1
jason.fisher commentedThis still exists with the non-official 7.x release of Views Control Field Display and should be corrected in that module/patch.
Comment #2
jason.fisher commented