Using Services > Browse > Servers > RES- /services/rest lead to HPH error :
Fatal error: Call to undefined function services_resource_uri_formatter() in ../sites/all/modules/rest_server/includes/RESTServer.inc on line 16
Using Services > Browse > Servers > RES- /services/rest lead to HPH error :
Fatal error: Call to undefined function services_resource_uri_formatter() in ../sites/all/modules/rest_server/includes/RESTServer.inc on line 16
Comments
Comment #1
freelockSee http://drupal.org/node/466922 - I ran into this same error. After applying the patch in that issue, I no longer got the error, but it can't find any resources to handle any requests --
In RESTServer.inc RESTServer::resolveController, the $resource array contains only a single member, '#action'. So this method always returns null, since it's looking for '#index','#retrieve','#create', etc. The $resource array is originally built by the patched Service module, in services.resource-translation.inc, _services_services_as_resources(), line 70 adds only '#action' items to the array that ends up in resolveController.
Is there any documentation for what structure the resources should contain, and how this maps to services?
Comment #2
Anonymous (not verified) commentedThx for your answer.
Applying the patch make the PHP error disappear.
But now we are at the same point !
Comment #3
freelockI did get this working, for nodes anyway. And built a custom service_resource module for my needs.
The working code isn't on drupal.org though--follow Hugo's links to github to get his patched service module and rest_server. The service module has some changes he's submitted as an issue, but it's deferred for a while--the github version has the necessary changes and a sample node service. Good stuff.
Note that to do any searches on the node index, you also need his query_builder module...
Comment #4
Anonymous (not verified) commentedI've just updated both services and rest server : no fatal !
But I still can't obtain response from services. But that's an other story.