I've was just creating an install routine for a site that uses this module and stumbled across a slight hiccup when trying to insert entries into the clientside_validation_settings table. My code is as follows:

  $uuids = entity_get_id_by_uuid('node', array('8404b5c1-0214-6be4-7559-c07782e8b00b'));
  $clientside_validation_settings = array(
    'type' => 'webforms',
    'status' => 1,
    'form_id' => $uuids['8404b5c1-0214-6be4-7559-c07782e8b00b'],
    'settings' => array(
      'validate_options_override_default' => 0,
      'error_override_default' => 0,
      'error_placement_override_default' => 0,
      'include_hidden_override_default' => 0,
    ),
  );
  drupal_write_record('clientside_validation_settings', $clientside_validation_settings);

However, when this runs, the current hook_schema implementation means that Drupal just inserts an unserialized array into the settings field. To get round it, I could serialize the data myself, but hook_schema() has a parameter which allows you to tell Drupal that a field in your table should contain serialized data. See http://drupal.org/node/146939 for info on the "serialized" boolean parameter.

Comments

andymantell’s picture

andymantell’s picture

Status: Active » Needs review
attiks’s picture

Version: 7.x-1.35 » 7.x-1.x-dev
Status: Needs review » Fixed

Thanks, fixed in latest dev version

Status: Fixed » Closed (fixed)

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