Hello I have this notice popping up:

Notice: Undefined variable: arguments in RESTServer->handle() (line 48 of PATH/sites/all/modules/services/servers/rest_server/includes/RESTServer.inc).

S.

CommentFileSizeAuthor
#3 notice_undefined-2650796-3.patch709 bytesjoelpittet

Comments

cimo75 created an issue. See original summary.

jeremy.zimmermann’s picture

Hi, I do have the same issue.

D 7.41 and 7.x-3.13 using the REST server.

joelpittet’s picture

Status: Active » Needs review
StatusFileSize
new709 bytes

Yeah, if you have required arguments and they are not sent in, the $arguments variable is never initialized because the method throws before the assignment.

Try this patch.

kylebrowning’s picture

Status: Needs review » Reviewed & tested by the community
Sumeet Darade’s picture

Having the same issue ! Only while registering a new user ! I can see patch above, not sure how to use it since am new to drupal and drupal modules !

Can someone help with applying the patch ?

Help is appreciated !

joelpittet’s picture

@Sumeet Darade there are some instructions how to apply a patch. It's a nice skill to have, hopefully this will help. https://www.drupal.org/patch/apply

Sumeet Darade’s picture

@joelpittet thanks for that ! I tried it and same response (500).

Can i check a list of fields that i can send/required to send for completing the registration ? is it the field issue ?

Sumeet Darade’s picture



I enabled the debug mode for the service ! which reported the following on trying to register...

Recoverable fatal error: Argument 2 passed to drupal_array_get_nested_value() must be of the type array, null given, called in /home/drupalsite/public_html/mywebsite/modules/field/field.default.inc on line 38 and defined in drupal_array_get_nested_value() (line 6786 of /home/drupalsite/public_html/mywebsite/includes/common.inc).

helps ?

Sumeet Darade’s picture



I am sorry for populating this issue with comments , but am trying to debug and i think it would help resolving the issue !

After all this time what i concluded is ,

Endpoint/user/register it works fine only if it has no custom fields !

As soon as remove all custom fields it starts working !

the custom field i made was,

mobile number
machine name --> field_mobile_number

i sent user data like this,

{
   "name":"user344",
   "pass":"thispasfsworde",
   "mail":"user344@samples.com",
   "field_mobile_number" : {
	"und" : [{ "value" : 9898989898 }]
	}
}

Didnt wrk !

for registration to work , i had to to remove the custom field even from the site !

Help is appreciated ! Thank you !

kylebrowning’s picture

Sumeet Darade’s picture

@ kylebrowning Thanks Alot ! That saved my life !

kylebrowning’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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