After installing Rabbit Hole I get this error when trying to view the admin/content page. We were getting a similar error when saving nodes but I cannot duplicate that.
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.rh_action' in 'field list': SELECT revision.vid AS vid, base.uid AS uid, revision.title AS title, revision.log AS log, revision.status AS status, revision.comment AS comment, revision.promote AS promote, revision.sticky AS sticky, base.nid AS nid, base.type AS type, base.language AS language, base.created AS created, base.changed AS changed, base.tnid AS tnid, base.translate AS translate, base.rh_action AS rh_action, base.rh_redirect AS rh_redirect, base.rh_redirect_response AS rh_redirect_response, revision.timestamp AS revision_timestamp, revision.uid AS revision_uid FROM {node} base INNER JOIN {node_revision} revision ON revision.vid = base.vid WHERE (base.nid IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4, :db_condition_placeholder_5, :db_condition_placeholder_6, :db_condition_placeholder_7, :db_condition_placeholder_8, :db_condition_placeholder_9, :db_condition_placeholder_10, :db_condition_placeholder_11, :db_condition_placeholder_12, :db_condition_placeholder_13, :db_condition_placeholder_14, :db_condition_placeholder_15, :db_condition_placeholder_16, :db_condition_placeholder_17, :db_condition_placeholder_18, :db_condition_placeholder_19, :db_condition_placeholder_20, :db_condition_placeholder_21, :db_condition_placeholder_22, :db_condition_placeholder_23, :db_condition_placeholder_24, :db_condition_placeholder_25, :db_condition_placeholder_26, :db_condition_placeholder_27, :db_condition_placeholder_28, :db_condition_placeholder_29, :db_condition_placeholder_30, :db_condition_placeholder_31, :db_condition_placeholder_32, :db_condition_placeholder_33, :db_condition_placeholder_34, :db_condition_placeholder_35, :db_condition_placeholder_36, :db_condition_placeholder_37, :db_condition_placeholder_38, :db_condition_placeholder_39, :db_condition_placeholder_40, :db_condition_placeholder_41, :db_condition_placeholder_42, :db_condition_placeholder_43, :db_condition_placeholder_44, :db_condition_placeholder_45, :db_condition_placeholder_46, :db_condition_placeholder_47, :db_condition_placeholder_48, :db_condition_placeholder_49)) ; Array ( [:db_condition_placeholder_0] => 722 [:db_condition_placeholder_1] => 713 [:db_condition_placeholder_2] => 530 [:db_condition_placeholder_3] => 411 [:db_condition_placeholder_4] => 718 [:db_condition_placeholder_5] => 599 [:db_condition_placeholder_6] => 280 [:db_condition_placeholder_7] => 665 [:db_condition_placeholder_8] => 482 [:db_condition_placeholder_9] => 546 [:db_condition_placeholder_10] => 362 [:db_condition_placeholder_11] => 159 [:db_condition_placeholder_12] => 428 [:db_condition_placeholder_13] => 221 [:db_condition_placeholder_14] => 296 [:db_condition_placeholder_15] => 681 [:db_condition_placeholder_16] => 498 [:db_condition_placeholder_17] => 562 [:db_condition_placeholder_18] => 379 [:db_condition_placeholder_19] => 444 [:db_condition_placeholder_20] => 244 [:db_condition_placeholder_21] => 315 [:db_condition_placeholder_22] => 697 [:db_condition_placeholder_23] => 514 [:db_condition_placeholder_24] => 578 [:db_condition_placeholder_25] => 95 [:db_condition_placeholder_26] => 395 [:db_condition_placeholder_27] => 460 [:db_condition_placeholder_28] => 264 [:db_condition_placeholder_29] => 331 [:db_condition_placeholder_30] => 589 [:db_condition_placeholder_31] => 406 [:db_condition_placeholder_32] => 471 [:db_condition_placeholder_33] => 594 [:db_condition_placeholder_34] => 275 [:db_condition_placeholder_35] => 660 [:db_condition_placeholder_36] => 342 [:db_condition_placeholder_37] => 477 [:db_condition_placeholder_38] => 541 [:db_condition_placeholder_39] => 357 [:db_condition_placeholder_40] => 423 [:db_condition_placeholder_41] => 610 [:db_condition_placeholder_42] => 291 [:db_condition_placeholder_43] => 676 [:db_condition_placeholder_44] => 493 [:db_condition_placeholder_45] => 557 [:db_condition_placeholder_46] => 374 [:db_condition_placeholder_47] => 439 [:db_condition_placeholder_48] => 233 [:db_condition_placeholder_49] => 309 ) in DrupalDefaultEntityController->load() (line 196 of /var/www/site/includes/entity.inc).

-Steve

Comments

olofbokedal’s picture

Do you know if you've got any other modules installed that modifies the node table? If you could check your node table, and give me the name of every column, that would help a lot.

Other than that, which Drupal version are you using? Any other modules that you think might collide with Rabbit Hole?

olofbokedal’s picture

Status: Active » Closed (cannot reproduce)

Not able to reproduce this. Please provide more info if this issue is still an issue.

sam0971’s picture

I have the exact same error.
Here is every column name in my node table.
nid - vid - type - language - title - uid - status - created - changed - comment - promote - sticky - tnid - translate

My enabled modules:
http://pastebin.com/Q4SsDjSB

sam0971’s picture

Status: Closed (cannot reproduce) » Active
Manuel Garcia’s picture

We had the same problem yesterday evening, rendering our whole website dead. We had to disable the module and only then the site got back up. I had just installed it that same day during the morning.

Here is the node table (disabeled module)

mysql> describe node;
+-----------+------------------+------+-----+---------+----------------+
| Field     | Type             | Null | Key | Default | Extra          |
+-----------+------------------+------+-----+---------+----------------+
| nid       | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| vid       | int(10) unsigned | YES  | UNI | NULL    |                |
| type      | varchar(32)      | NO   | MUL |         |                |
| language  | varchar(12)      | NO   |     |         |                |
| title     | varchar(255)     | NO   | MUL |         |                |
| uid       | int(11)          | NO   | MUL | 0       |                |
| status    | int(11)          | NO   | MUL | 1       |                |
| created   | int(11)          | NO   | MUL | 0       |                |
| changed   | int(11)          | NO   | MUL | 0       |                |
| comment   | int(11)          | NO   |     | 0       |                |
| promote   | int(11)          | NO   | MUL | 0       |                |
| sticky    | int(11)          | NO   |     | 0       |                |
| tnid      | int(10) unsigned | NO   | MUL | 0       |                |
| translate | int(11)          | NO   | MUL | 0       |                |
+-----------+------------------+------+-----+---------+----------------+
14 rows in set (0.00 sec)

Could be becasue of the rabbit_hole.install file? I havent had the time to troubleshoot this, but I miss a hook_install/hook_uninstall, and/or hook_enable/hook_disable. Especial the hook_install since you cannot expect people to run updates just because they enabled a new module.
Or perhaps the hook_updates get executed anyway? Again, havent had the time to troubleshoot this...

Testing this a bit on my local machine, after enabling rh_node,

mysql> describe node;
+----------------------+------------------+------+-----+---------+----------------+
| Field                | Type             | Null | Key | Default | Extra          |
+----------------------+------------------+------+-----+---------+----------------+
| nid                  | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| vid                  | int(10) unsigned | YES  | UNI | NULL    |                |
| type                 | varchar(32)      | NO   | MUL |         |                |
| language             | varchar(12)      | NO   |     |         |                |
| title                | varchar(255)     | NO   | MUL |         |                |
| uid                  | int(11)          | NO   | MUL | 0       |                |
| status               | int(11)          | NO   | MUL | 1       |                |
| created              | int(11)          | NO   | MUL | 0       |                |
| changed              | int(11)          | NO   | MUL | 0       |                |
| comment              | int(11)          | NO   |     | 0       |                |
| promote              | int(11)          | NO   | MUL | 0       |                |
| sticky               | int(11)          | NO   |     | 0       |                |
| tnid                 | int(10) unsigned | NO   | MUL | 0       |                |
| translate            | int(11)          | NO   | MUL | 0       |                |
| rh_action            | int(11)          | YES  |     | NULL    |                |
| rh_redirect          | longtext         | YES  |     | NULL    |                |
| rh_redirect_response | int(11)          | YES  |     | NULL    |                |
+----------------------+------------------+------+-----+---------+----------------+
17 rows in set (0.00 sec)

I then disabled the modules, and then uninstalled first rh_node and then rabbit_hole, I stil have the extra columns on the node table. This module needs a hook_uninstall at the very least.

rmathew’s picture

I can confirm this error on a fresh install of rh_taxonomy:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.rh_action' in 'field list': SELECT base.tid AS tid, base.vid AS vid, base.name AS name, base.description AS description, base.format AS format, base.weight AS weight, base.rh_action AS rh_action, base.rh_redirect AS rh_redirect, base.rh_redirect_response AS rh_redirect_response, v.machine_name AS vocabulary_machine_name FROM {taxonomy_term_data} base [...]

It looks like rh_taxonomy is not creating the fields on taxonomy_term_data when it's enabled (possibly because rh_node is not enabled?)

rmathew’s picture

Priority: Major » Critical
rmathew’s picture

Priority: Critical » Major
criznach’s picture

This seems critical to me but I'll leave it as-is. It put my dev site into an unusable state until I disabled rabbit_hole and rh_node. It seems like something is keeping rabbit_hole_modules_installed() from running when rh_node is enabled. This will break your site, so I'd treat this module with caution until this is solved. It's not clear why the fields go missing. My dev site is missing them. The live site is working fine. I have not rolled back the database or made any major changes other than installing rabbit_hole and rh_node.

Indeed, as Manuel said, the fields are not installed by a hook_install like normal. But the rabbit_hole module uses hook_modules_installed() to detect when rh_node is installed and add it's schema fields from it's hook_rabbit_hole. This seems to be done for modularity, which is nice, but it's somewhat non-standard.

I did manage to find a workaround if you want to keep using rabbit_hole. If you are indeed missing the fields from the base table, node.rh_action, for example, you can force them to be created. The trick is you must uninstall rh_node, then rabbit_hole and reinstall. Not just disable, but uninstall. Then when you re-enable rh_node, hook_modules_installed() gets called properly. Just enabling them does not call this hook.

I don't have time now to submit a patch, but please consider changing hook_modules_installed to hook_modules_enabled, and test that the schema fields exist after enabling. This would at least make the module more robust.

  • olofjohansson committed 2b904d7 on 7.x-2.x
    Issue #2028173 by skessler, criznach: Changed hook_modules_installed()...
olofbokedal’s picture

Status: Active » Fixed

I'm still not able to reproduce this, but the hook_modules_enabled() approach seems like a good workaround for those of you who are experiencing the problem. It's still the same logic within the function, the only difference is that the columns are being added when the module is enabled, if they're missing.

I'll close this for now. If any of you guys knows how to reproduce this, please reopen this.

arpitr’s picture

Version: 7.x-2.21 » 7.x-2.23
Status: Fixed » Active

I am getting the same issue while installing rabbit_hole and rh_node 7.x-2.23 module on lightning distro. The error says as following

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.rh_action' in 'field list': SELECT revision.vid AS vid, base.uid AS uid, revision.title AS title, revision.log AS log, revision.status AS status, revision.comment AS comment, revision.promote AS promote, revision.sticky AS sticky, base.nid AS nid, base.type AS type, base.language AS language, base.created AS created, base.changed AS changed, base.tnid AS tnid, base.translate AS translate, base.rh_action AS rh_action, base.rh_redirect AS rh_redirect, base.rh_redirect_response AS rh_redirect_response, revision.timestamp AS revision_timestamp, revision.uid AS revision_uid FROM {node} base INNER JOIN {node_revision} revision ON revision.vid = base.vid WHERE (base.nid IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2)) ; Array ( [:db_condition_placeholder_0] => 11 [:db_condition_placeholder_1] => 14216 [:db_condition_placeholder_2] => 761 ) in DrupalDefaultEntityController->load() (line 191

While following #9 I am able to setup rabbit hole.

olofbokedal’s picture

Just to confirm, you're using the https://www.drupal.org/project/lightning install profile together with Rabbit Hole, right?

Did you install the profile, and then Rabbit Hole, or did you install Rabbit Hole during the site installation? Do you have any other modules enabled, besides those that are included in Lightning?

Detailed steps in order to reproduce this would be much appreciated.

fox_01’s picture

In my case the internal_nodes module caused the error

2pha’s picture

I got this error today when I tried to uninstall (after already disabling) rabbit hole and fields ui at the same time.
Site died.
I then tried to re-enable rabbit hole with drush which said it was already enabled....weird as I thought I had just disabled it.
I then enable the field ui module with drush and the site came back to life.

fubarhouse’s picture

I just want to add that I received this error when building a site through a shell script which downloads the database from a server before importing.
The reason I got this error was that the SSH connection was prematurely terminated and my database was incomplete.

It may be worth checking out, but I thought I should contribute my experience with this.

  • olofjohansson committed 2b904d7 on 8.x-1.x
    Issue #2028173 by skessler, criznach: Changed hook_modules_installed()...
therobyouknow’s picture

Here's some input from me that might be of help: could the issues seen here be related the version of MySQL?

My comment is based on the following findings, so far:

- In a staging/test enviroment running MySQL 5.5.38 with Ubuntu 12.04 ( 5.5.38-0ubuntu0.12.04.1 as seen on Drupal admin status page - admin/reports/status ). We encounter the error seen in this ticket after enabling the module.
- In a local development environment running MySQL 5.6 ( 5.6.33 as seen on Drupal admin status page - admin/reports/status) there is no error seen after enabling the module, the site appears to be running as normal, based on initial checks so far
- In a local development environment running MySQL 5.5.52 ( 5.5.52-0ubuntu0.14.04.1 as seen on Drupal admin status page - admin/reports/status ) there is no error seen after enabling the module, the site appears to be running as normal, based on initial checks so far

On the basis of the findings above, a possible solution could be to either:
- upgrade MySQL 5.5 if running minor version 5.5.38 to 5.5.52 (or perhaps even later)
- use MySQL 5.6 (specifically 5.6.33 or perhaps later version of 5.6 if available) instead of MySQL 5.5 ( 5.5.38 )

jdleonard’s picture

Added related issue.

Flushing memcache helped resolve this for me.