Closed (fixed)
Project:
Services
Version:
7.x-3.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2011 at 18:34 UTC
Updated:
6 Jul 2020 at 23:22 UTC
Jump to comment: Most recent
On MAMP I am getting this error.
Notice: Undefined index: rest_server in services_endpoint_callback() (line 196 of /Applications/MAMP/htdocs/service01/sites/all/modules/services/services.module).
In addition, I can not call a service.
I do get this message when I call:
http://service01:8888/testservice01
Services Endpoint "testservice01" has been setup successfully.
but when I try...
http://service01:8888/testservice01/json
I get a 404 JSON service not found.
Comments
Comment #1
rickmanelius commentedSame here. The endpoint is setup, and the services_test one works and responds with "CRUD Retrieve test"
But with node or anything else... it's
Notice: Undefined index: rest_server in services_endpoint_callback() (line 196 of services.module).
Comment #2
aaronott commentedThis error refers to the settings section of the server, in this case the rest_server. Tracing this back I found that the server_settings array was empty even though there are the default check boxes on the settings screen:
I found that when I went back to admin/structure/services/list/event/server and changed the check boxes and clicked save, the settings were available and I wasn't getting this error anymore:
Comment #3
rickmanelius commentedI can confirm that the fix in #2 fixes the error.
Comment #4
kylebrowning commentedIm not sure, is this a bug?
The one thing I can say is that JSON is not a resource.
http://service01:8888/testservice01/json is an invalid URL.
make sure node resource is enabled and try http://service01:8888/testservice01/node
Comment #5
BarisW commentedAnd if you want JSON output, try http://service01:8888/testservice01/node.json
Re #2: Saving the'SERVER' form solves this bug as well. Maybe the default server settings are incorrect?
Comment #6
batje commentedI had this too, but then on ubuntu linux.
Resaving worked, and the special condition i had was that i was using a D7 database that had been upgraded from D6. (i did a drush pm-uninstall services before doing a drush pm-enable services)
Comment #7
franzI have a similar problem, same error. In my case, however, the resources are missing from the server info array, and they still show up on the 'Resources' tab as checked. I tried saving this page without success:
Comment #8
franzMy issue was something else, as I was using the wrong REST method.
Comment #9
ltwinner commentedResaving the settings worked for me too.
Comment #10
ygerasimov commentedThere was a bug fixed in #1436366. Resaving endpoint will fix your settings.
Closing this issue.
Comment #12
liquidcms commentedUnfortunately i can't change status of this.
This is still broken. I cannot make changes (check or uncheck) to Resources. Status suggests saved; but no change shows up after. No errors and nothing in logs. Other forms submit fine.
On linux copy of the site it seems almost random; sometimes saved, sometimes not. On WAMP copy of the site; it never saves.