next_serial needs to have a default value set in webform_node_defaults() to prevent undefined index errors.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam Morland’s picture

Assigned: Liam Morland » Unassigned
Status: Active » Needs review
FileSize
375 bytes

Fix.

DanChadwick’s picture

Status: Needs review » Reviewed & tested by the community

I could not reproduce the error. I know you developed this. Does your next_serial column in your database have a default of 1?

But in any case, I agree that the patch is proper. Clearly there shouldn't be a missing next_serial in the node when it is created. Please commit to d7 and d8 at your convenience.

Liam Morland’s picture

The database has the default, but I get the error when I load the form settings page. That could be caused by a particularity in our setup, which adds customizations to Webfrom. In any case, I thought that it was proper to have the default provided.

Liam Morland’s picture

It seems that on a Webform-enabled content type, before any Webform data is saved, there is no row in the webform table, and, therefore, no default value. Save the Form settings page or create a component and the row in webform table is created.

DanChadwick’s picture

Version: 7.x-4.x-dev » 8.x-4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed to:

7.x-4.x commit 9f9e787
8.x commit b6e6275 (which has the wrong commit message again, darn it.)

Status: Fixed » Closed (fixed)

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

DanChadwick’s picture

Version: 8.x-4.x-dev » 7.x-4.x-dev