Text field mapper doesn't support FeedsElement.
I mapped SimplePie's enclosure field with simple text field and after the import field is blank.
The reason of this behavior is that text field mapper just ignores all objects rather than to receive value from them.


if (!is_array($v) && !is_object($v)) {
  $field['und'][$i]['value'] = $v;
Members fund testing for the Drupal project. Drupal Association Learn more


Sergii’s picture

Status: Active » Needs review
570 bytes

Add patch.

Sergii’s picture

New patch from module's root folder.

Sergii’s picture

The same behavior for the link field mapper.

Sergii’s picture

Priority: Normal » Major
twistor’s picture

Status: Needs review » Needs work
+++ b/mappers/field.incundefined
@@ -110,6 +110,12 @@ function _field_feeds_set_target($source, $entity, $target, $value, $input_forma
+      $text = $v->getValue();
+      if (is_string($text) && !empty($text)) {
+        $v = $text;

Don't do the is_string() or !empty() check here. It could be any scalar and the subsequent !is_array() and !is_object() checks will do just fine.

twistor’s picture


twistor’s picture

Status: Needs work » Patch (to be ported)
twistor’s picture

Version: 7.x-2.x-dev » 6.x-1.x-dev
twistor’s picture

Issue summary: View changes
Status: Patch (to be ported) » Closed (outdated)