I came across some troubles using module Search Service 7.x-3.0. with Services 7.x-3.2. They seem to be incompatible ? Is there a plan of releasing some new version that will work with Services 7.x-3.2 ?

Comments

DrMiaow’s picture

Is this genuine or have you found your issue?

I can't get this module to work at all and I'm wondering if this is my issue.

DrMiaow’s picture

Bump.

@sinisar Did you manage to resolve this?

flapsjack’s picture

I have determined that this module will currently not work with services 7.x-3.3. I have posted a bug report on the services module asking about some of the specifics of what is required for a service endpoint. It turns out that a service needs to have at least 1 path argument for the services module to properly locate the service controller. This module does not have a path argument for some of its services which results in it not working as expected with the current version of the services module.

Hopefully that helps clear up some things and possibly will help the developer of this module update the code.

sinisar’s picture

@DrMiaow, unfortunately I didn't resolve it. I used older version of services (Services 7.x-3.0) that works fine with Search Service 7.x-3.0. But that's not a solution but it works for now.

Hopefully some kind of upgrade on module Search Services is on the way ...

weboperator’s picture

I can confirm. There is no chance to get this module working with Services 7.x-3.2 and Services 7.x-3.3.

I've created a service called "jos", activated "search_node" in services configuration and tried the following request: [URL_TO_DRUPAL]/jos/search_node/retrieve.json?keys=Test
I alwasy get a error 404 not found.

If I try [URL_TO_DRUPAL]/drupal/jos/node/1.json, [URL_TO_DRUPAL]/jos/node.json or something else - this means just a "normal" request not a search - everything works as expected -> fine.

moertle’s picture

Status: Active » Needs review
StatusFileSize
new2.76 KB

It seems that you can not create your defined search url in case of retrieve in Services 7.x-3.2 and later.
I had the same issue with mit own Service, and after changing the structure of the URL, everything works fine.

Check out the appended patch, you can call the search service now like this:
[URL_TO_DRUPAL/[SERVICE_NAME]/search_node/[SEACH_KEYS].json[PARAMS]

sinisar’s picture

@moertle I can't get it working using your patch. Can you please show some example of call.
I don't know what is [SEARCH_KEYS] - is it retreive or ... ?

moertle’s picture

The URL returns search results,
the meaning of [SEARCH_KEYS] are the Search Keys like "contact":
http://example.com/?q=api/search_node/contact.jsonp

if you use multiple terms like "dave contact", it must look like this:
http://example.com/?q=api/search_node/dave%20contact.jsonp

dippers’s picture

This patch adds an 'path' argument rather than reusing the 'keys' param as a path. This means you do not need to change the calling url so search_node/retrieve.json?keys=Test will work. It also fixes search-user.

zoo33’s picture

Category: support » bug
Status: Needs review » Fixed

Awesome, thanks! Committed this to 7.x-3.x. Please test and report back, and I'll make a new release once it seems to work for people.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kenwen’s picture

I'm receiving this error

Search services 7.x-3.0+1-dev, services 7.x-3.4+12-dev

This si the error we get when running a query through

http://appmedianetwork.com/api/search_node/retrieve.json?keys=Anna%20Boe...

returns

Fatal error: Call to undefined function services_node_load() in /services_search/services_search.resource.inc on line 52

Any assistance much appreciated

Ken

moertle’s picture

This issue might help you to understand your problem: http://drupal.org/node/1971116

Atomox’s picture

Version: 7.x-3.0 » 7.x-3.x-dev
Component: Miscellaneous » Code

Any update on removing services_node_load() from the module? As Moertle pointed out, this deprecated call was removed from Service back in the Spring.

alenatrss’s picture

I think we should keep 'fields' parameter in place (as we won't always need to get ALL node fields) and services_node_load was solely used for it. We just need to add services_node_load (maybe rename it to somethings else).

function services_node_load($node, $fields = array()) {
  if (!isset($node->nid)) {
    return NULL;
  }

  // Loop through and get only requested fields
  if (count($fields) > 0) {
    foreach ($fields as $field) {
      $val->{$field} = $node->{$field};
    }
  }
  else {
    $val = $node;
  }

  return $val;
}
stongo’s picture

So what is the resolution of this? Don't upgrade services?

tyler.frankenstein’s picture

Issue summary: View changes

I've created an issue and patch for the fix to services_node_load() being deprecated:

#2229489: 500 Internal Server Error
https://drupal.org/files/issues/restore_feature-2229489-1.patch

This resolves the issue and searches can be completed.

j2’s picture

This appears to no longer be working.

I get this as a response to any search query:

"GET: https://mysite.com/?q=drupalgap/search_node/retrieve.json&keys=test - 404 - Not Found"
["Search returned no results."]

I'm using the 7.x-3.0+3-dev version of this module, and version 7.x-3.16 of Services module.

Are there any plans to fix/update this module?

Hyp1’s picture

@tyler

is this module still maintained?

best regards

drupalbabaji’s picture

StatusFileSize
new6.54 KB

Created collective patch for issues
i) Controller not found.
ii) service_node_load function not found.