Skip to main content
6 events
when toggle format what by license comment
Feb 24, 2016 at 22:07 comment added Berdir What I find surprising is how it did that upcasting example and how it accepted the thing without format, because then treated it as the value for the first field item. I know field API itself accepts pretty much anything ($node->body = $value works too, for example). But I thought the serialization API would be more strict in requiring a list of field item objects for each field.
Feb 24, 2016 at 22:05 comment added Berdir Oh, it kind of does. I think what this tried to do is create a body field with two values, so basically this: [ ['value' => 'whatever was in this.state.body'], ['value' => 'basic_html']]. And it probably happened because it first ignored the array keys and made them numeric and in a second step used the two strings as value for the main property, value.
Feb 24, 2016 at 22:01 comment added Wim Leers But what is surprising (well, concerning), is that error message: ` this field cannot hold more than 1 values`. That makes zero sense.
Feb 24, 2016 at 22:00 comment added Wim Leers Why surprised? It'd be surprising if this didn't work, no?
Feb 24, 2016 at 14:12 vote accept Marius Ilie
Feb 23, 2016 at 20:03 history answered Berdir CC BY-SA 3.0