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
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | views_savedsearches.js_.464156-4.patch | 1.1 KB | redpuma |
Comments
Comment #1
apv commentedsame issue..anyone has the answer ,please help
Thanks
Comment #2
droberge commentedI 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
Comment #3
maryedith commentedI 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!
Comment #4
pydubreucq commentedHi,
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 :
AND
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
Comment #5
pydubreucq commentedHi 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
Comment #6
redpuma commentedSame issue here:
I just tried the second patch from Pyd and it works.
Comment #7
redpuma commentedJust created a patch file based on the above #2 and #4 patch code.
Comment #8
pydubreucq commentedHi,
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 ++
Comment #9
pydubreucq commentedExcuse-me I'm tired...
My js file was already modified ;)
It's work fine with the original file ;)
CiaO ++
Comment #10
pydubreucq commentedHi,
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 ;)
Comment #11
redpuma commentedHi 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
Comment #12
pydubreucq commentedHi,
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
Comment #13
pydubreucq commentedFor information I have tested with and whitout php safe_mod
And It's not a problem with that...
Comment #14
pydubreucq commentedHi,
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 ;)
Comment #15
pydubreucq commentedHi 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
Comment #16
pydubreucq commentedArf,
I'm happy too fast...
This problem is not solved... :(
Sniff... :(
I don't know why this problem appears...
Comment #17
pydubreucq commentedHi,
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
Comment #18
wonder95 commentedThe patch by @redpuma in #7 and the fix in #17 by @pydubreucq made it work for me.
Comment #19
johnlee80 commentedI'm struggling with this module. I've tried all the suggestions on this page but nothing shows.
If I configured everything correctly, should the 'save search' link simply appear underneath or above the exposed search form?
Comment #20
aron novakI confirm #18 , those two changes simply make the stuff work.
Sidenote: I wanted to prepare one patch to cover all these changes, but usually such patches needs to be done against -dev. I checked out the HEAD from the CVS and the saving form did not appear.
Comment #21
quicksketchAnyone interested in maintaining this module (and fixing this problem), please see #652972: Views Saved Searches needs a new maintainer.
Comment #22
aron novakTry 6.x-1.0-beta2, it should be fixed now.
Comment #24
om252345 commentedHello friends
First I want to thank who created views & views saved searches.
I want to give a bug report. Views do not save exposed filters when views have exposed form in block
to yes. So the result to saved searches is the path to view page
Please solve.
Comment #25
itzramona commentedI have tried it in the block mode and I agree that it does not work. Are you implying above that if you use it in page mode it works?
Comment #26
marianista commentedHello everyone!!! Im spanish, excuse me for my english...
I´m using Saved Searches 6.x-1.0-beta3
In my search (view) I use :
- Textarea for word key
- List based on Taxonomy with hierarchical select
- List based on cck field
- Textarea for cck field
The problem:
* warning: Invalid argument supplied for foreach() in ...mypath.../sites/all/modules/hierarchical_select/hierarchical_select.module on line 864.
* warning: Invalid argument supplied for foreach() in ...mypath.../sites/all/modules/hierarchical_select/hierarchical_select.module on line 547.
The filters are saved in the data base without poblems, and the error is only with the hierarchical select...
And other problem is that i cant use the block "My views saved search"... i don´t know why... i activate the block but it doesn run!!!
Please HELP!!!
Comment #27
marianista commentedok, the solution?...use the favorite module, includin an input text to describe the serarch...
thanks!!
Comment #28
elwood commentedfollowing
Comment #29
gianfrasoft commentedfollowing
Comment #30
gianfrasoft commentedTake a look at this:
http://drupal.org/node/956726