Hi - just tried enabling Rules as well as CiviCRM Rules Integration and got this
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'onz.rules_dependencies' doesn't exist: SELECT rd.id AS id FROM {rules_dependencies} rd INNER JOIN {rules_config} rc ON rd.id = rc.id WHERE (rd.module IN (:db_condition_placeholder_0, :db_condition_placeholder_1)) AND (rc.dirty = :db_condition_placeholder_2) ; Array ( [:db_condition_placeholder_0] => rules [:db_condition_placeholder_1] => civicrm_rules [:db_condition_placeholder_2] => 1 ) in rules_modules_enabled() (line 1141 of /home/www-home/drupal7/sites/all/modules/rules/rules.module).

So disabled CiviCRM RUles got this
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'onz.rules_dependencies' doesn't exist: SELECT DISTINCT rd.id AS id FROM {rules_dependencies} rd INNER JOIN {rules_config} rc ON rd.id = rc.id WHERE (rd.module IN (:db_condition_placeholder_0)) AND (rc.dirty = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => civicrm_rules [:db_condition_placeholder_1] => 0 ) in rules_modules_disabled() (line 1179 of /home/www-home/drupal7/sites/all/modules/rules/rules.module).

Disabled RUles - no error

Renabled Rules, Rules UI and Rules Scheduler got

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'onz.rules_dependencies' doesn't exist: SELECT rd.id AS id FROM {rules_dependencies} rd INNER JOIN {rules_config} rc ON rd.id = rc.id WHERE (rd.module IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2)) AND (rc.dirty = :db_condition_placeholder_3) ; Array ( [:db_condition_placeholder_0] => rules [:db_condition_placeholder_1] => rules_admin [:db_condition_placeholder_2] => rules_scheduler [:db_condition_placeholder_3] => 1 ) in rules_modules_enabled() (line 1141 of /home/www-home/drupal7/sites/all/modules/rules/rules.module).

Any suggestions? Thanks

Comments

dee_wilcox’s picture

I am having the exact same issue -- same error code exactly, except that I never had Civi CRMRules installed.

giorgio79’s picture

Title: PDO excepting upon installation » PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rules_dependencies' doesn't exist
Priority: Normal » Major

Updating title to be more accurate.

I seem to be unable to install Rules on a site I just upgraded from D6 to D7.

I cannot run update.php as advised here #1275592: rules_dependencies table doesn't exist ? as my site is broken. I need to go into the db and set rules to 0 in system table to get it to work again. This happens even after uninstalling and reinstalling Rules.

giorgio79’s picture

Version: 7.x-2.0-rc2 » 7.x-2.1

Happens even with the latest stable.

giorgio79’s picture

Status: Active » Closed (fixed)

Ok, I had to delete rules entries from system table after uninstallation. That did it, and I could install.

cmwalolo’s picture

Component: Miscellaneous » Rules Core

And how do we the delete those entries ?

I'm discovering Drupal and try to find out what we can do with it... And got the same error... But I'm a bit pissed off to reinstall the complete thing. As I break that thing so easily with installing/uninstalling modules.

I reinstalled with enabling a lot of modules at the same time, and the rules thing crashed... And I can't reinstall it.

Thanks

shabana.navas’s picture

I have got the exact error when updating from Rules 6.x-1.1 to 7.x-2.2. I have disabled it for now. Is there a fix for this other than uninstalling??

servantleader’s picture

Status: Closed (fixed) » Active

This is not fixed, but needs to be fixed.

servantleader’s picture

Version: 7.x-2.1 » 7.x-2.2
arlingtonvoicellc’s picture

I am receiving this same error with most current version (2.3) upon enabling the module.

It crashes my website and gives me a white screen on every page. Any fix available?

fullerja’s picture

I had the same error. I used drush to run the update script. It all works for me now. I can see the update process for fixing this in the list of updates "7205 - Add the rules_dependencies table and the rules_config.dirty column."

klausi’s picture

Category: bug » support
Status: Active » Fixed

Yes, please run update.php or drush updb.

Status: Fixed » Closed (fixed)

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