Closed (fixed)
Project:
SQL Search (Trip Search)
Version:
4.6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Feb 2006 at 16:31 UTC
Updated:
17 Mar 2007 at 14:32 UTC
This should be a really easy one for you guys.
I'm trying to modify i404.module to work with trip_search.
I've swapped out
$results = search_data($keys);
and replaced with
$results = trip_search_get($keys);
but I get this error:
Missing argument 2 for trip_search_get()
I've tried inserting ('node', $keys), ('basic', $keys), etc which cures the error report, but I'm still not getting any search results ...
what should the first argument be? (or am I using the wrong function altogether?)
any suggestions? please?
Comments
Comment #1
JohnG-1 commentedapologies for the bump, but surely this seems like a straight forward question which should have a very easy answer ... please could someone take a moment to point me in the right direction?
Comment #2
nedjotrip_search_get expects keys that have been parsed into an array. You need to first pass your keys through
trip_search_parsed(). If you're dealing with node data, try:But the results array will differ from what you get from core search, and will need different handling.
Comment #3
JohnG-1 commentedthanks nedjo - much appreciated.
hmm see what you mean about handling the $results ... not as easy as I thought :(
this is the module I'm trying to modify, with your code added:
as it stands, $results just comes through as the word 'Array' in the html.
I guess I would need to rip some code from the trip_search.module ... but that appears - at a first glance - to be quite extensive ....
I'm wondering if it would be easier to redirect the 'page not found' $keys to trip_search via a url and simply return a standard trip_search results page ... ?
any suggestions very much welcome.
Comment #4
joel_guesclin commentedI'm interested in this - is it still active? I'm closing all requests raised on the 4.6 version since I don't intend to continue maintaining this. But would be interested in collaborating for 4.7
Comment #5
JohnG-1 commentedI think the function of the ii404 module is a very good one but I have sadly been unable to get it to work with 4.6 Trip Search.
I would like to keep it open in the hope that someday someone clever will come along and waive their magic wand at it .... :)
Personally I've been putting off the upgrade to Drupal 4.7 yet but it seems that the increasingly unavoidable due lack of support for 4.6.
Comment #6
mindless commentedTo use the above code you'd need to change
$output .= $results;into a foreach loop on $results. A simpler solution might be for ii404.module to show a simple page with some informative text and a link to /trip_search?keys=.... Or even auto-redirect to that page after 5 seconds or something. Let us know if it's ok to close this request now, thanks.Comment #7
JohnG-1 commented@ mindless : Thank you for the suggestion. As you no doubt realise this is a very old issue so I'm not running anything currently that would benefit. I do still like the feature and I will try out your suggestion when time permits. Please feel free to close this issue.
Many thanks,
JohnG
Comment #8
mindless commented