The Problem
-
Drupal 6.22 install with REST server and Services modules.
-
I do a POST to
http://domainname.co.uk/rest/users/logoutand I get a 500 error. -
In the Logs:
PHP Fatal error: Call to undefined function services_resource_uri_formatter() in /home/organicd/public_html/domainname.co.uk/live/public/sites/all/modules/rest_server/includes/RESTServer.inc on line 15
Background
I had the Drupal install with REST server installed and working perfectly. The whole install was moved to a different server (not by me). I was told that all folders have been kept intact. The only difference was that the old server had an SSL certificate.
With the old server, I could do a POST using REST Console to https://domainname.co.uk/rest/users/logout and it would logout the current user. Now I get a 500 error with the log entry above.
What I’ve Tried
-
Disabling REST Server. I read that Services 3.0 has REST built into it. When I disable REST Server and Services, then re-enable Services, I get:
The plugin definition of services_ctools_export_ui cannot locate schema services_endpoint.and I don’t see anywhere in administer by module that I can setup the REST settings.
-
Different version of Services. Tried updating from
6.x-3.0-rc1to6.x-3.0but it doesn’t make any difference -
Hacking the code. I found a version of the services.module that has the
services_resource_uri_formatter()function. I added that in, but got a similar error saying it couldn’t find another function. I sense this road leads to madness.
Versions
- Drupal 6.22
- Ctools 6.x-1.x-dev
- REST Server 6.x-2.0-beta3
- Services 6.x-3.0-rc1 (also tried latest version of 6.x-3.0)
Question
How do I get Drupal 6.22 REST to work once again? What am I doing wrong?
Thanks John and Mir,
We realized that what happened in our case was a conflict between the rest_server single module and the rest server capability that is included on the services module itself.
We had our module dependent on the rest_server module and we were enabling and loading it. This module was broken regarding services.
The solution for our case was to disable the single rest_server and delete it. Disable services and enable again. there should appear another rest_server version 3 which is the one that comes with services.
Then we enable this rest server module and it all works like magic.
Regards.