After reverting a feature that contains scald_context_config components, we get the following exception when submitting the context form on "/admin/structure/scald/image/contexts":

PDOException: SQLSTATE[HY000]: General error: 1364 Field 'data' doesn't have a default value: INSERT INTO {scald_context_config} (context, transcoder, player) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array
(
    [:db_insert_placeholder_0] => rmd-34s
    [:db_insert_placeholder_1] => a:3:{s:4:"file";a:1:{s:1:"*";s:11:"passthrough";}s:5:"image";a:1:{s:1:"*";s:13:"style-rmd-34s";}s:5:"video";a:1:{s:1:"*";s:11:"passthrough";}}
    [:db_insert_placeholder_2] => a:3:{s:4:"file";a:1:{s:1:"*";s:7:"default";}s:5:"image";a:2:{s:1:"*";s:7:"default";s:8:"settings";a:0:{}}s:5:"video";a:1:{s:1:"*";s:7:"default";}}
)
 in drupal_write_record() (line 7202 of /***/includes/common.inc).

Comments

ciss’s picture

Status: Active » Needs review
StatusFileSize
new428 bytes

We were able to trace the problem back to scald_context_config_load() and solved it by providing a default value for the data property (see attached patch).

ciss’s picture

Title: PDO exception when saving contexts » PDO exception when saving context configuration after context feature revert

  • jcisio committed ccb2589 on 7.x-1.x authored by ciss
    Issue #2389149 by ciss: PDO exception when saving context configuration...
jcisio’s picture

Status: Needs review » Fixed

We should have had NULL as default value. BTW this patch fixes the error. Committed and pushed. Thanks.

Status: Fixed » Closed (fixed)

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