I'm importing a feed with <!--break--> tags, but the actual splitting of the teaser and body does not happen.

The tag is imported fine into the node, but have no effect until I do a edit&save.

Comments

Grayside’s picture

FeedsNodeProcessor::process() does not run the new node object through node_submit().

As such, while the teaser break syntax is in place, it is never processed to extract the teaser.

idcm’s picture

subscribe

alex_b’s picture

Status: Active » Fixed

This should be fixed by now. As soon as a value is mapped to "body" a teaser should be generated; see code:

 public function setTargetElement($target_node, $target_element, $value) {
    if (in_array($target_element, array('url', 'guid'))) {
      $target_node->feeds_node_item->$target_element = $value;
    }
    elseif ($target_element == 'body') {
      $target_node->teaser = node_teaser($value);
      $target_node->body = $value;
    }
    elseif (in_array($target_element, array('title', 'status', 'created'))) {
      $target_node->$target_element = $value;
    }
  }

Setting to fixed. If this problem still occurs, please reopen.

idcm’s picture

thanks Alex but where does this go?

cglusky’s picture

@idcm Alex is showing you the code that is already in the module to add teasers, so no action required. Should be fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.