Getting Following errors while running the comment update Rest service.
{
"message": "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."
}
Using below json format to test the service:
{
"_links": {
"type": {
"href": "http://localhost/d8_blog/drupal/rest/type/comment/comment"
}
},
"langcode":[{"value":"en"}],
"subject":[{"value":"New comment created on 01 March2"}],
"uid":[{"target_id":"1"}],
"status":[{"value":"1"}],
"comment_type":[{"target_id":"comment"}],
"default_langcode":[{"value":"1"}],
"comment_body":[{"value":"<p>New body...</p>","format":"basic_html"}]
}
Comments
Comment #2
rashid_786 commentedComment #3
rashid_786 commentedComment #4
swentel commentedComment #5
wim leersComment #6
catchDuplicate of #2626298: REST module must cache only responses to GET requests.
Comment #7
sblommers commentedI have this also with a get request when using:
in my ServiceDefinition (services module). Seems like toUrl() somewhere is calling a render out of the context ?