Views Saved Searches not saving the exposed filters values
leospataro - May 15, 2009 - 23:36
| Project: | Views Saved Searches |
| Version: | 6.x-1.0-beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Description
I'm trying to create a page where the users can save its searches, but I realized that the data for the exposed filters is not saved on the DB. The 'filters' field in the views_savedsearches table gets an empty array (a:0:{}).
I found a couple of possibles bugs like a missing parameter in the views_savedsearches_save function and the _views_savedsearches_params_to_filters function is not getting the filters selected.
I will really appreciate any help.
Thanks

#1
same issue..anyone has the answer ,please help
Thanks
#2
I ran into the same issue. As it turns out, it seems like an issue inside the java script included with the saved search module. My best guess is that Views was updated and this module was not. The line I patched was:
//formData.push({ name: 'views_filters_form', value: $('form#views-filters').formSerialize() });
var theForm = $('.view-filters form')[0];
formData.push({ name: 'views_filters_form', value: $(theForm).formSerialize() });
Patching this line allowed the searches to be saved correctly.
Hope this helps
#3
I had the same issue. Implemented the patch suggested above, and drupal saved my exposed filter. However, I got this message:
warning: implode() [function.implode]: Invalid arguments passed in /var/www/vhosts/maryedithconsulting.com/subdomains/test1/httpdocs/acquia/sites/all/modules/views_savedsearches/views_savedsearches.module on line 183.
droberge, can you provide a patch to correct this?
Many thanks!
#4
Hi,
I have the same issue but your patch don't work for me :(
I have modified the views_savedsearches.js file at line 45 and 61
I put that :
45 //formData.push({ name: 'views_filters_form', value: $('form#views-filters').formSerialize() });46 var theForm = $('.view-filters form')[0];
47 formData.push({ name: 'views_filters_form', value: $(theForm).formSerialize() });
AND
63 //formData.push({ name: 'views_filters_form', value: $('form#views-filters').formSerialize() });64 var theForm = $('.view-filters form')[0];
65 formData.push({ name: 'views_filters_form', value: $(theForm).formSerialize() });
Do you know why it's don't work for me ?
And I would like to know if this module is supported or not ?
Thanks by advance ;)
Best Regards
Pyd
#5
Hi all,
This patch works on another server, I don't know why ???
But I have the same error than @maryedith :(
I saw this problem just apear when I save the search.
After I can use my saved Search without error...
Excuse me I'm French and I don't speak english very well :(
Thanks by advance ;)
Bye
Pyd
#6
Same issue here:
I just tried the second patch from Pyd and it works.
#7
Just created a patch file based on the above #2 and #4 patch code.
#8
Hi,
Thanks for this patch, but It doesn't work for me :(
I have this error message :
patch -p0 < views_savedsearches.js_.464156-4.patch
patching file views_savedsearches.js
Hunk #1 FAILED at 42.
Hunk #2 FAILED at 59.
2 out of 2 hunks FAILED -- saving rejects to file views_savedsearches.js.rej
I don't know why :(
Thanks by advance ;)
CiaO ++
#9
Excuse-me I'm tired...
My js file was already modified ;)
It's work fine with the original file ;)
CiaO ++
#10
Hi,
I have the same problem than @maryedith
warning: implode() [function.implode]: Invalid arguments passed in /var/www/drupal/sites/all/modules/views_savedsearches/views_savedsearches.module on line 183.
:(
Anybody have this problem ?
Thanks by advance ;)
#11
Hi Pyd,
what servers are they?
I'm running this on a Debian Etch server, but will deploy onto a Centos (Redhat) server later so I'm hoping I don't get this problem. Can you say what the server's differences are?
Steve
#12
Hi,
This is my configuration :
Ubuntu 9.04
Apache 2.2.11-2ubuntu2.3
PHP 5.2.6.dfsg.1-3ubuntu4.2
Mysql 5.1.30really5.0.75-0ubuntu10.2 (I know it's not a mysql problem, but with this you have all my information)
I infer that you do not have the same problem ?
Bye
#13
For information I have tested with and whitout php safe_mod
And It's not a problem with that...
#14
Hi,
In my search I use :
- Textarea for word key
- List based on Taxonomy
- List based on cck field
Do you use the same ?
Thanks by advance ;)
#15
Hi all :D
I found how to solve my problem :)
This problem (php warning error with implode function) was because my view use ajax
I edit my view to modify ajax use and It's work fine ;)
Thanks for all ;)
Bye
#16
Arf,
I'm happy too fast...
This problem is not solved... :(
Sniff... :(
I don't know why this problem appears...
#17
Hi,
To solve the problem with implode you can modify at line 183 on views_savedsearches.module file
//$form['#redirect'][1] = implode('&', $query);
$form['#redirect'][1] = request_uri();
I don't found the response alone, it's emerya a member of Drupal French forum :)
Thanks
#18
The patch by @redpuma in #7 and the fix in #17 by @pydubreucq made it work for me.