The 'nid' never gets passed to the node_save() call, thus a new node is always created. Suggested addition to the code:

if (array_key_exists('nid', $props)) {
        $nid = $props['nid'];
      }
      else {
        $nid = '';
      }

And then later

$node->nid = $nid;

I don't know how to work with the Drupal system of contributing to modules.... or even if you're INTERESTED in having someone else contribute to this module ... but I could help out.

Also I was thinking that changing:

 if (array_key_exists('title', $props)) {
        $title = $props['title'];
      }
      else {
        $title = '';
      }

to:

 if (array_key_exists('title', $props)) {
        $title = $props['title'];
      }

might also be a good idea, otherwise upon an update the existing title of a node will be wiped out

Comments

brendoncrawford’s picture

hermes_costell,

If you have the skills and time and to contribute to this module, I would gladly give you commit access. Private message me if you are still interested.

Thanks,
Brendon