I have a fresh Drupal 7 installation with the webform and webform_validation modules installed. I tried to create a new webform and got the following error:

Notice: Undefined property: stdClass::$clone_from_original_nid in webform_validation_node_clone() (line 273 of webform_validation/webform_validation.module).

CommentFileSizeAuthor
#1 webform_validation-check_for_node_clone.patch613 bytesAnonymous (not verified)

Comments

Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new613 bytes

I have the same issue with Drupal 7.0, Webform 3.9 and Webform Validation 7.0 RC1.

It seams that the webform validation does not check for the an installed node_clone module. If you look at the "webform_validation_node_insert" function at line 242 you will see that it will always evaluate to true if the content type can have a webform. Adding a module_exists() function instead of TRUE does the trick for me.

<?php
/**
 * Implements hook_node_insert().
 */
function webform_validation_node_insert($node) {
  if (module_exists('node_clone')) {
    if (in_array($node->type, webform_variable_get('webform_node_types'))) {
      webform_validation_node_clone($node);
    }
  }
}
?>

Attached is a patch that fixes that issue and adds the check.

svendecabooter’s picture

Status: Needs review » Fixed

Check for node_clone existence has been added now.

Status: Fixed » Closed (fixed)

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