I'm guessing this is due to the new rules integration.

FYI...When I install this module using an install profile, I get the following error when installing with drush si:

Starting Drupal installation. This takes a few seconds ...                                               [ok]
WD rules_config: PDOException: SQLSTATE[HY000]: General error: 1364 Field 'plugin' doesn't have a default[error]
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] => 
    [:db_insert_placeholder_1] => 2
    [:db_insert_placeholder_2] => entityform
)
 in drupal_write_record() (line 7042 of /home/quickstart/websites/updater.dev/includes/common.inc).
WD php: PDOException: SQLSTATE[HY000]: General error: 1364 Field 'plugin' doesn't have a default value:  [error]
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] => 
    [:db_insert_placeholder_1] => 2
    [:db_insert_placeholder_2] => entityform
)
 in drupal_write_record() (line 7042 of /home/quickstart/websites/updater.dev/includes/common.inc).
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] => 
    [:db_insert_placeholder_1] => 2
    [:db_insert_placeholder_2] => entityform
)
 in drupal_write_record() (line 7042 of /home/quickstart/websites/updater.dev/includes/common.inc).
Drush command terminated abnormally due to an unrecoverable error.                                       [error]
CommentFileSizeAuthor
#11 entityform-1701496-11.patch4.78 KBscottrigby

Comments

tedbow’s picture

Issue tags: +drush

@gmclelland thanks for reporting this. I was getting a similar error with this #1678200: Parse error unexpected T_SL in entityform.rules_defaults.inc on line 9 but thought that was fixed and it wasn't related to drush.

Few questions

  1. What version of php are you using?
  2. Do you have this problem if you use the install profile through the browser?
  3. Do you have this problem if you just enable the module without outside of a install profile(with/without drush)?

Thanks

gmclelland’s picture

What version of php are you using?

I am using http://drupal.org/project/quickstart that includes:
CLI Using PHP 5.3.5-1ubuntu7.10 with Suhosin-Patch (cli) (built: Jun 19 2012 00:54:05)
Web PHP Version 5.3.5-1ubuntu7.10 with the Suhosin Patch 0.9.10

Do you have this problem if you use the install profile through the browser?

Yes, here is what is displayed on the screen when trying to install via the install profile using the web.

Notice: Trying to get property of non-object in entityform_default_rules_configuration() (line 14 of /home/quickstart/websites/updater.dev/profiles/cmf/modules/contrib/entityform/entityform.rules_defaults.inc).
Notice: Trying to get property of non-object in entityform_default_rules_configuration() (line 14 of /home/quickstart/websites/updater.dev/profiles/cmf/modules/contrib/entityform/entityform.rules_defaults.inc).
SQLSTATE[HY000]: General error: 1364 Field 'plugin' doesn't have a default value
Do you have this problem if you just enable the module without outside of a install profile(with/without drush)?

Haven't tried, I will try and give it shot.

gmclelland’s picture

It might be because I enabled entityform and entityform_notifications without having downloaded: http://drupal.org/project/variable_email
http://drupal.org/project/variable
http://drupal.org/sandbox/tedbow/1674042 - Entity To Text

Are all those modules required?

tedbow’s picture

You are using the same php as me so that isn't the issue.

Dependencies

These are required:
http://drupal.org/project/variable_email
http://drupal.org/project/variable
variable_email is in the entityform_notifications.info file(dev) and variable_email should make you get variable.

Not sure if that will fix your issue but let me know if it does.

Let me your answer to question 3 from above when you get a chance.

gmclelland’s picture

Status: Active » Fixed

Installation worked after including those modules. Yay!

Two things you might want to do:
1. Advertise that the dev version requires entityform_notifications to use those modules mentioned.
2. Maybe include a drush make file inside of entityform_notifications that will download those modules for you. See how http://drupal.org/project/custom_formatters includes one. That way if someone uses an installation profile or just uses drush dl entityform, it will automatically download the required modules.

Thanks for the help, I like the direction you are going with this module. I love hearing about the different use cases, like replacing the contact module.

mrfelton’s picture

Please do not include a drush make file. Or, if you do make it a drush.make.example file. Including a drush make file introduces more problems than it solves. eg. #1329346: Remove Drush Make dependency definitions (rules.make), #839580: Make file broken with drush make 2.0 - remove it please, #1152088: Please remove "projects[] = libraries" from from geofield.make.

This may or may not have been fixed in recent drush by #947158: Recursive makefiles can cause conflicts. I haven't tested that.

gmclelland’s picture

@mrfelton - Hmmm... I wasn't aware of that. Probably best to not include it then.

gmclelland’s picture

Status: Fixed » Active

Well I spoke to soon. I'm not sure why, but when I tried reinstalling using drush si it still isn't working.

Starting Drupal installation. This takes a few seconds ...                                               [ok]
WD rules_config: PDOException: SQLSTATE[HY000]: General error: 1364 Field 'plugin' doesn't have a default[error]
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] => 
    [:db_insert_placeholder_1] => 2
    [:db_insert_placeholder_2] => entityform
)
 in drupal_write_record() (line 7042 of /home/quickstart/websites/updater.dev/includes/common.inc).
WD php: PDOException: SQLSTATE[HY000]: General error: 1364 Field 'plugin' doesn't have a default value:  [error]
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] => 
    [:db_insert_placeholder_1] => 2
    [:db_insert_placeholder_2] => entityform
)
 in drupal_write_record() (line 7042 of /home/quickstart/websites/updater.dev/includes/common.inc).
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] => 
    [:db_insert_placeholder_1] => 2
    [:db_insert_placeholder_2] => entityform
)
 in drupal_write_record() (line 7042 of /home/quickstart/websites/updater.dev/includes/common.inc).
Drush command terminated abnormally due to an unrecoverable error.                                       [error]

So I commented out entityforms and entityforms_notifications from my installation profile and did a drush si and it installed as normal.

I then enabled the modules at admin/modules and everything seemed ok.

Then I noticed when I go to /admin/structure/entityform_types I get the following:

Notice: Undefined variable: forms in entityform_forms() (line 1174 of /home/quickstart/websites/updater.dev/profiles/cmf/modules/contrib/entityform/entityform.module).

FYI... I get the same error when I install with drush si with a fresh drupal standard installation profile with the latest following additional modules
dependencies[] = admin_menu
dependencies[] = ctools
dependencies[] = entity
dependencies[] = entityform
dependencies[] = entityform_notifications
dependencies[] = entityreference
dependencies[] = rules
dependencies[] = rules_admin
dependencies[] = rules_scheduler
dependencies[] = variable
dependencies[] = variable_email
dependencies[] = views
dependencies[] = views_data_export

tedbow’s picture

Title: Drush installation error » Drush installation or enabling error

Ok I am now getting this problem again. This happens when I try to enable the module via Drush. In my case drush make or an install profile module is not involved.

Just:

drush en entityform

I get the exact same issue as in #8.

It works fine enabling the module from the browser. Maybe this is a Drush issue?

gmclelland’s picture

I'm not sure it is drush causing the problem. I also see the problem when I try to install my installation profile via the web(without drush envolved). The error is listed in #2.

Seems like the organic groups module has had these Rules type error problems before.

scottrigby’s picture

Title: Drush installation or enabling error » Entityform rules_config error
Status: Active » Needs review
StatusFileSize
new4.78 KB

I think the problem in #8 is two of the default rules in entityform.rules_defaults.inc rely on variable_email.module:

  • rules_email_entityform_submitter
  • rules_email_entityform_admin

I'm adding a patch that moves those two rules to entityform_notifications/entityform_notifications.rules_defaults.inc, which seems to work as expected with both Drush and install profiles.

scottrigby’s picture

Title: Entityform rules_config error » Entityforms rules_config error
tedbow’s picture

Status: Needs review » Fixed

Committed this Thanks @scottrigby, I should have moved that when I made the new entityform_notifications module.

gmclelland’s picture

Thanks @scottrigby and @tedbow, good catch.

scottrigby’s picture

Awesome :)

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