Description from from http://lists.drupal.org/archives/development/2006-09/msg00166.html

I was trying to update a node using FAPI2, but it completely failed.
First, I found out that I must cast the node into an array:

      $node = (array) node_load($nid);

      $values['title'] = $question['q_desc'];
      $values['body'] = theme('demexp_question_body', $question);
      //  $values['changed'] = time();
      drupal_execute('demexp_question_node_form', $values, $node);

but drupal_execute fails.
I get: "This content has been modified by another user, changes cannot be
saved." which comes from here:

  if (isset($node->nid) && (node_last_changed($node->nid) > 
$_POST['changed'])) {   
    form_set_error('changed', t('This content has been modified by another 
user, changes cannot be saved.'));
  }

now, with the FAPI push method, $_POST is not set, so the check above always fail.

Comments

heine’s picture

Status: Active » Closed (duplicate)