Active
Project:
Services
Version:
7.x-3.3
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2013 at 08:57 UTC
Updated:
17 Oct 2015 at 09:30 UTC
Jump to comment: Most recent
Simple select list not accepting value.
Watchdog: Illegal choice in "BU" element.
Warning: Illegal offset type in isset or empty in list_field_validate() (line 394 of /modules/field/modules/list/list.module).
The web service is calling in JSON:
{
"type":"TEST",
"title":"TITLE",
"uid":"1",
"field_mosaic_bu":{ "und": [{"value":"bu name"}] },
"field_mosaic_var1":{ "und": [{ "value":"test1" }] },
"field_mosaic_var2":{ "und": [{ "value":"test2" }] },
"field_mosaic_var3":{ "und": [{ "value":"test3" }] },
"field_mosaic_image":{ "und": [{ "fid":"4" }] }
}
The issue is coming from "field_mosaic_bu" which is a Select list. "bu name" is a correct value.
If I put a plain textfield, it works fine.
Any help would be much appreciated.
This post http://drupal.org/node/1144236 seems to be a similar probleme, but not only contained for select lists.
Comments
Comment #1
marcingy commentedComment #2
teebo commentedFor those of you who will probably have the same problem, here is the correct way to handle LIST type fields (in ex. below field_mosaic_bu):
Hope this helps someone. Took me a lot of time to figure this out.
Comment #3
marcingy commentedComment #5
kartagisSorry for butting on this, but I've got the same issue, only with checkboxes. Has anyone found a solution for this? In case anyone is interested, here is my question on Drupal Answers.