Hello,
As I used your module, I've noticed that the value of a content field is fetch through the node language
in contentapi_retrieve we have line 333;
$lang = $raw_node->language;
If I understand this schema https://drupal.org/files/Fieldlanguagevariants.png, it should be the language of the field rather than the language of the node when we fetch the value.
To fix this, I've used this piece of code to get the body of my page and that work
$body_language = field_language('node', $raw_node, 'body');
Can you confirm this is a bug or did I misunderstood the way this module work?
Thanks folks
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | contentapi-body-field-check-7.patch | 666 bytes | shopoftheworld |
Comments
Comment #1
shopoftheworld commentedI had a similar related issue caused by my content type not having a body field that was called body.
I patched this by checking the Body field exists before attempting to get its language value.
Patch attached may help someone