OS: Ubuntu 12.04.1 LTS \n \l
Database: Ver 14.14 Distrib 5.5.31
Web Server: Apache/2.2.22 (Ubuntu)
PHP 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
Drupal 7.21

Repeatable: Always

Steps to repeat:
1. Download and enable Webform Scheduler module
2. Modify the webform form settings and save

Expected results:
Should see the updated webform form settings page

Actual results:
Page displays unexpected error message with notices
• Notice: Undefined index: #node inwebform_scheduler_form_webform_configure_form_alter() (line 28 of modules/contrib/webform_scheduler/webform_scheduler.module).
• Notice: Trying to get property of non-object inwebform_scheduler_form_webform_configure_form_alter() (line 28 of modules/contrib/webform_scheduler/webform_scheduler.module).
• Notice: Undefined index: #node inwebform_scheduler_form_webform_configure_form_submit() (line 143 of modules/contrib/webform_scheduler/webform_scheduler.module).
• Notice: Trying to get property of non-object inwebform_scheduler_form_webform_configure_form_submit() (line 143 of modules/contrib/webform_scheduler/webform_scheduler.module).
• Notice: Undefined index: #node inwebform_scheduler_form_webform_configure_form_submit() (line 151 of modules/contrib/webform_scheduler/webform_scheduler.module).
• Notice: Trying to get property of non-object inwebform_scheduler_form_webform_configure_form_submit() (line 151 of modules/contrib/webform_scheduler/webform_scheduler.module).
• PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY': INSERT INTO {webform_scheduler} (nid, begin, end, restriction_method) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => 2 ) in drupal_write_record() (line 7106 of /var/www/d7-core/7.21/includes/common.inc).

Proposed patch is attached.

CommentFileSizeAuthor
webform_scheduler_patch.txt1.8 KBmarybethg
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dwieeb’s picture

Status: Active » Fixed

Strange, I didn't get these errors by modifying webforms. The form should have the node object, because it's not possible to get to that form without already have created a node.

Regardless, the patch has been applied to dev.

Status: Fixed » Closed (fixed)

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