Hello,
I'm trying to install rules module.
I put the rules directory in /sites/all/modules/ and run update.php.
It says :

No pending updates.
Front page
Administration pages

So I go to the modules administration page to enable the rules module and when I save, i have an error message :

The website encountered an unexpected error. Please try again later.

When I run update.php again, i have a more explicit message :

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xxx.rules_config' doesn't exist

And if i look in my db, i can see i have no rules table...

Does someone have a clue or if not, the create table statements for the rules tables ?

Thanks,

Comments

Stefan Lehmann’s picture

That's odd. The rules_config table is part of the schema definition of rules and should have been created when you enabled the module. Did something strange happen when you enabled it? Any error message etc?

I like cookies!

PushingJoe’s picture

Nothing I can remember... No error message except th one i posted. And i've tried many times :-)
Except i was late on updating drupal's core (I was only in 7.50) and some modules...
These other modules updated and installed well.
It's just like if drupal believes rules tables were already installed. Is there a table where this is flagged ? How drupal knows db updates are pending ? I may have done some nasty tries that confused drupal (i don't think so but as i struggled for some hours, it is possible).
If I can't find the good solution, is there a way to have the create table sql statement to do it manually and go on ?
Thanks.

PushingJoe’s picture

So, if someone has the reason why this append, i would be interested.
Anyway, i found a turning around.
I reinstalled a fresh minimal drupal.
I installed entity and then rules (and everything went allright).
I looked in the database what tables contained rules in the name and I found 5 :
cache_rules, rules_config, rules_dependencies, rules_tags, rules_trigger
I exported them.
On my application database, i played that script and now it seems to work.