Get text_long field value with EntityMetadataWrapper I am trying to get data from a text_long type field using EntityMetadataWrapper, and from what I'm seeing on the interwebs, I should be using something like this:

$wrapper-&gt;{$field}-&gt;value();


or

$wrapper-&gt;{$field}-&gt;value-&gt;value();


However, if I use the first one, I get an array with format and value keys, but if I try the latter, I get an Call to a member function value() on null` error.

Do I have to use $wrapper-&gt;{$field}-&gt;value(); and manually get the value from the array? Or is there a more direct method? I've looked through the class, I don't see another method that gets the value data.
Since the long text field is an array in the entity Metadata wrapper (due to fact that long text fields can have an input format applied to them),  you should decode the text.


See the Drupal.org entity Metadata documentation and search for the example
$wrapper->body->value->value(array('decode' => TRUE));
Also, check out this similar post about handling the formatting of long text fields when extracting with entity Metadata wrappers