On trying to install the commerce_ss module I'm getting errors with some of the rule imports.

For rules_stock_decrease_when_completing_the_order_process:

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_decrement_stock_completing_order [:db_insert_placeholder_1] => 2 [:db_insert_placeholder_2] => commerce_ss ) in drupal_write_record() (line 6975 of /Users/hadfield/Sites/hatch-7.3/includes/common.inc).

For rules_stock_validate_add_to_cart and rules_stock_validate_checkout:

WD rules: The reaction rule Stock: disable add to cart  (rules_stock_disable_add_to_cart)     [error]
fails the integrity check and cannot be executed. Error: Data selector
commerce-product:commerce-stock for parameter data is invalid.

I'm running the latest dev version of rules, but also testing it on 2.0. I'm running the 7.x-2.x out of git for commerce_stock and I got the same errors with the 7.x-1.0-rc1 version of commerce_stock.

Any ideas?

CommentFileSizeAuthor
#5 1447210_5.patch556 bytesguy_schneerson

Comments

hadsie’s picture

Status: Active » Fixed

nevermind, figured it out. I didn't have the cart and checkout modules enabled

Status: Fixed » Closed (fixed)

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

2pha’s picture

Version: 7.x-2.x-dev » 7.x-1.1
Status: Closed (fixed) » Active

I just encountered this too. version 7.x-1.1
I was only enabling the stock module to test a module that required it.
Without the cart module enabled I get the error when trying to enable the stock module. Having the cart module enabled before enabling the stock module does not produce the error.

I think the stock module should list the cart module as a dependency so this error does not happen.
Setting status back to active.

2pha’s picture

Title: commerce_ss default rules import is triggering errors » PDOException: when enabling module

Oh, I only get the first error listed by the OP (PDOException:). I didn't see the WD rules one so I changed the title.

guy_schneerson’s picture

Status: Active » Needs review
StatusFileSize
new556 bytes

Patch adding cart dependencies and other missing dependencies

guy_schneerson’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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