Similar to #2607618: Source URL not being saved ?, the scald_width and scald_height fields do not exist. All atoms fall back to default dimensions. We should somehow create these fields on install.

Comments

jcisio created an issue.

jcisio’s picture

Something like this with some more check. Post here as a quick fix:

    $field = array(
      'field_name' => 'scald_width',
      'type' => 'text',
      'label' => t('Width'),
    );
    field_create_field($field);

    $instance = array(
      'field_name' => 'scald_width',
      'label' => t('Width'),
      'entity_type' => 'scald_atom',
      'bundle' => 'iframe',
      'required' => FALSE,
    );

    if (!field_read_instance($instance['entity_type'], $instance['field_name'], $instance['bundle'])) {
      field_create_instance($instance);
    }

    $field = array(
      'field_name' => 'scald_height',
      'type' => 'text',
      'label' => t('Height'),
    );
    field_create_field($field);

    $instance = array(
      'field_name' => 'scald_height',
      'label' => t('Height'),
      'entity_type' => 'scald_atom',
      'bundle' => 'iframe',
      'required' => FALSE,
    );

    if (!field_read_instance($instance['entity_type'], $instance['field_name'], $instance['bundle'])) {
      field_create_instance($instance);
    }