One of the rules this Feature tries to create throws an error

PDOException: SQLSTATE[HY000]: General error: 1364 Field 'plugin' doesn't have a default value: INSERT INTO {rules_config} (name, status, module) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => rules_ticket_reservation_is_redeemed [:db_insert_placeholder_1] => 2 [:db_insert_placeholder_2] => cod_registration_email ) in drupal_write_record() (line 7379 of /var/www/drupal/public_html/includes/common.inc).

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

twardnw created an issue. See original summary.

hampercm’s picture

Priority: Normal » Major

This error is still occurring in beta6. Raising priority to Major as it prevents functionality from being used, with no known work-around.

$ dr fr cod_registration_email
Do you really want to revert cod_registration_email.rules_config? (y/n): y

Creating default object from empty value entity.module:880                                                                                                               [warning]
WD rules_config: PDOException: SQLSTATE[HY000]: General error: 1364 Field 'plugin' doesn't have a default value: INSERT INTO {rules_config} (name, status, module) VALUES[error]
(:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array
(
    [:db_insert_placeholder_0] => rules_ticket_reservation_is_redeemed
    [:db_insert_placeholder_1] => 2
    [:db_insert_placeholder_2] => cod_registration_email
)
 in drupal_write_record() (line 7386 of docroot/includes/common.inc).
PDOException: SQLSTATE[HY000]: General error: 1364 Field 'plugin' doesn't have a default value in                                                                        [error]
docroot/includes/database/database.inc:2227
Stack trace:
#0 docroot/includes/database/database.inc(2227): PDOStatement->execute(Array)
#1 docroot/includes/database/database.inc(697): DatabaseStatementBase->execute(Array, Array)
#2 docroot/includes/database/mysql/query.inc(36): DatabaseConnection->query('INSERT INTO {ru...', Array, Array)
#3 docroot/includes/common.inc(7386): InsertQuery_mysql->execute()
#4 docroot/profiles/cod/modules/contrib/entity/includes/entity.controller.inc(446):
drupal_write_record('rules_config', Object(stdClass))
#5 docroot/profiles/cod/modules/contrib/entity/includes/entity.controller.inc(949):
EntityAPIController->save(Object(stdClass), Object(DatabaseTransaction))
#6 docroot/profiles/cod/modules/contrib/rules/includes/rules.core.inc(153):
EntityAPIControllerExportable->save(Object(stdClass), Object(DatabaseTransaction))
#7 docroot/profiles/cod/modules/contrib/entity/entity.module(293): RulesEntityController->save(Object(stdClass))
#8 docroot/profiles/cod/modules/contrib/entity/entity.module(946): entity_save('rules_config', Object(stdClass))
#9 docroot/profiles/cod/modules/contrib/entity/entity.module(857): _entity_defaults_rebuild('rules_config')
#10 docroot/profiles/cod/modules/contrib/entity/includes/entity.controller.inc(890): entity_defaults_rebuild(Array)
#11 docroot/profiles/cod/modules/contrib/rules/includes/rules.core.inc(277):
EntityAPIControllerExportable->delete(Array, Object(DatabaseTransaction))
#12 docroot/profiles/cod/modules/contrib/entity/entity.module(338): RulesEntityController->delete(Array)
#13 docroot/profiles/cod/modules/contrib/entity/entity.module(316): entity_delete_multiple('rules_config', Array)
#14 docroot/profiles/cod/modules/contrib/entity/entity.features.inc(135): entity_delete('rules_config',
'rules_ticket_co...')
#15 docroot/profiles/cod/modules/contrib/entity/entity.features.inc(191):
EntityDefaultFeaturesController->revert('cod_registratio...')
#16 docroot/profiles/cod/modules/contrib/features/features.module(597): entity_features_revert('cod_registratio...',
'rules_config')
#17 docroot/profiles/cod/modules/contrib/features/features.module(1003): features_invoke('rules_config',
'features_revert', 'cod_registratio...')
#18 docroot/profiles/cod/modules/contrib/features/features.module(1024): _features_restore('revert', Array)
#19 docroot/profiles/cod/modules/contrib/features/features.drush.inc(804): features_revert(Array)
#20 drush/drush/includes/command.inc(366): drush_features_revert('cod_registratio...')
#21 drush/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array)
#22 drush/drush/includes/command.inc(185): drush_command('cod_registratio...')
#23 drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#24 drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#25 drush/drush/drush.php(12): drush_main()
#26 {main}
ShaunLaws’s picture

This appears to be caused by an error in the default rules configuration. I believe this also will fix 7.x-2 Version installation results in broken site.

ShaunLaws’s picture