In this section of `state_flow_promote_node_revision()`:

// From workbench_moderation:
  // Path module is stupid and doesn't load its data in node_load.
  if (module_exists('path') && isset($current_rev->nid)) {
    $path = array();
    $conditions = array(
      'source' => 'node/' . $current_rev->nid,
      'language' => isset($current_rev->language) ? $current_rev->language : LANGUAGE_NONE,
    );
    $path = path_load($conditions);
    if ($path === FALSE) {
      $path = array();
    }
    if (isset($current_rev->path)) {
      $path += $current_rev->path;
    }
    $current_rev->path = $path;
  }

$current_rev gets $path attached to its path property even if $path is empty.

Path.module meanwhile checks isset($node->path), which returns TRUE for even an empty array. This causes it to attempt to run through its hook_node_insert() and hook_node_update() functions and then fail.

$current_rev->path should not receive $path unless $path is not empty.

Comments

fmitchell’s picture

Status: Fixed » Closed (fixed)

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