I'm trying to create new nodes by POST
ing to /entity/node?_format=json
.
This is the body I'm sending:
{
"_links": {
"type": {
"href": "http:\/\/my.drupal.be\/rest\/type\/node\/group_of_documents"
}
},
"title": [{
"value": "Direct test - type 682"
}],
"body": [{
"value": ""
}],
"field_owner": [{
"value": "Symfony"
}],
"field_type": [{
"target_id": "682"
}]
}
And, in a way, this works. Because the document gets made, and everything is filled in.
But I keep getting an error:
A fatal error occurred:
The controller result claims to be providing relevant cache metadata,
but leaked metadata was detected.
Please ensure you are not rendering content too early.
Returned object class: Drupal\rest\ResourceResponse.
If I create a node without field_type
, it doesn't throw an error.
field_type
is the only field that has the Reference type -> Reference views -> Reference method set to Views: Filter by an entity reference view
. Does that have anything to do with it?