When i import a feed w/ Feeds module, the feed-items translate and synchronize just fine, other than the author and created on date. the author goes to Anonymous, and the created on date goes to the date that the feed was imported, not the date it was actually created. (i.e. if i import a feed-item that was published 3 weeks ago, it gives the created on date of when it was originally published - then the translated node comes out with the created on date of now)

I tried a quick patch just plugging in
$new_node->created = $node->created;
$new_node->uid = $node->uid;

but that didnt work.

Any ideas? Thanks

Comments

boogsbobo’s picture

Title: Feeds feed-items do not keep author and created date » Translated feed-items do not keep author and created date
boogsbobo’s picture

Could be related to this: http://drupal.org/node/398110

Sorry, this is definitely over my head as far as programming goes. Thanks for your module!

boogsbobo’s picture

It seems that this part of the FeedsNodeProcessor.inc may have to be integrated with the module?

   /**
   * Creates a new node object in memory and returns it.
   */
  protected function buildNode($nid, $feed_nid) {
    $node = new stdClass();
    if (empty($nid)) {
/**/      $node->created = FEEDS_REQUEST_TIME;
      $populate = TRUE;
    }
    else {
      if ($this->config['update_existing'] == FEEDS_UPDATE_EXISTING) {
        $node = node_load($nid, NULL, TRUE);
      }
      else {
        $node->nid = $nid;
        $node->vid = db_result(db_query("SELECT vid FROM {node} WHERE nid = %d", $nid));
        $populate = TRUE;
      }
    }
    if ($populate) {
      $node->type = $this->config['content_type'];
/**/      $node->changed = FEEDS_REQUEST_TIME;
      $node->format = $this->config['input_format'];
      $node->feeds_node_item = new stdClass();
      $node->feeds_node_item->id = $this->id;
/**/      $node->feeds_node_item->imported = FEEDS_REQUEST_TIME;
      $node->feeds_node_item->feed_nid = $feed_nid;
      $node->feeds_node_item->url = '';
      $node->feeds_node_item->guid = '';
    }

    static $included;
    if (!$included) {
      module_load_include('inc', 'node', 'node.pages');
      $included = TRUE;
    }
    node_object_prepare($node);

    // Populate properties that are set by node_object_prepare().
    $node->log = 'Created/updated by FeedsNodeProcessor';
    if ($populate) {
/**/      $node->uid = $this->config['author'];
    }
    return $node;
  }

the lines I have marked /**/ seem to be the parts not workign with i18n_auto.

this part of the i18n_auto module seems to be where that code would be inserted:

      // prepare the new node
      $new_node = (object)array();
      node_object_prepare($new_node);

      $new_node->name  = $node->name;
      $new_node->type  = $node->type;
      $new_node->language = $langcode;
      $new_node->tnid = $node->nid;

Well, thats about as far as I can take it! Sorry I know this is a big request. Might even be a new module - "feeds auto translate"

If you have the time to look at the code I would really appreciate it!

greg.harvey’s picture

Title: Translated feed-items do not keep author and created date » Add support for the Feeds module
Version: 6.x-2.0 » 6.x-2.x-dev
Category: support » feature
mortician’s picture

Priority: Normal » Major

Any updates on this?

greg.harvey’s picture

Priority: Major » Normal

No, D7 port is the priority.

greg.harvey’s picture

Status: Active » Closed (won't fix)

Sorry, this project is no longer supported - strongly advise you move to using https://drupal.org/project/tmgmt