I get blank page after installing rules 2.1 after downgrade to 2.0 all is OK.

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.access_exposed'...

Comments

fago’s picture

Status: Active » Postponed (maintainer needs more info)

Sounds like you have an old database, maybe it previously was enabled but not uninstalled properly. In that case update.php updates should be available? Anything, it shouldn't happen on a clean install. Please test.

trotsak’s picture

I think you right fago, on clean installation all have OK, but problem in that I have very living (..yet) site.
What I have doing for update Rules without blank page?

NathanM’s picture

Also got this error upon updating from 2.0 to 2.1.

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.access_exposed' in 'where clause': SELECT base.id AS id, base.name AS name, base.label AS label, base.plugin AS plugin, base.active AS active, base.weight AS weight, base.status AS status, base.dirty AS dirty, base.module AS module, base.data AS data FROM {rules_config} base WHERE (base.plugin IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4)) AND (base.access_exposed = :db_condition_placeholder_5) ; Array ( [:db_condition_placeholder_0] => or [:db_condition_placeholder_1] => and [:db_condition_placeholder_2] => action set [:db_condition_placeholder_3] => rule [:db_condition_placeholder_4] => rule set [:db_condition_placeholder_5] => 1 ) in EntityAPIController->query() (line 152 of /home/asiascen/public_html/hkscene.com/sites/all/modules/entity/includes/entity.controller.inc).

The update to 2.1 failed. Is there a way to re-run the update without cleaning out the rules database?

NathanM’s picture

Reverting back to 2.0 for the time being seems to work without much difficulty, for those who find themselves in a similar situation.

coert’s picture

Same problem as described by #1, also have the same DB-error as #3. I've got a stack trace with that:

[Mon Mar 19 00:55:33 2012] [warn] [client 89.184.165.55] mod_fcgid: stderr: PHP Fatal error:  Call to undefined function user_access() in /hum/userdata/xx/dub2/sites/all/modules/rules/rules.module on line 1194
[Mon Mar 19 00:55:33 2012] [warn] [client 89.184.165.55] mod_fcgid: stderr: PHP Stack trace:
[Mon Mar 19 00:55:33 2012] [warn] [client 89.184.165.55] mod_fcgid: stderr: PHP   1. {main}() /hum/userdata/xx/dub2/drupal-7.12/index.php:0
[Mon Mar 19 00:55:33 2012] [warn] [client 89.184.165.55] mod_fcgid: stderr: PHP   2. drupal_bootstrap() /hum/userdata/xx/dub2/drupal-7.12/index.php:20
[Mon Mar 19 00:55:33 2012] [warn] [client 89.184.165.55] mod_fcgid: stderr: PHP   3. _drupal_bootstrap_page_cache() /hum/userdata/xx/dub2/drupal-7.12/includes/bootstrap.inc:2138
[Mon Mar 19 00:55:33 2012] [warn] [client 89.184.165.55] mod_fcgid: stderr: PHP   4. bootstrap_invoke_all() /hum/userdata/xx/dub2/drupal-7.12/includes/bootstrap.inc:2295
[Mon Mar 19 00:55:33 2012] [warn] [client 89.184.165.55] mod_fcgid: stderr: PHP   5. module_invoke() /hum/userdata/xx/dub2/drupal-7.12/includes/bootstrap.inc:1099
[Mon Mar 19 00:55:33 2012] [warn] [client 89.184.165.55] mod_fcgid: stderr: PHP   6. call_user_func_array() /hum/userdata/xx/dub2/drupal-7.12/includes/module.inc:795
[Mon Mar 19 00:55:33 2012] [warn] [client 89.184.165.55] mod_fcgid: stderr: PHP   7. rules_exit() /hum/userdata/xx/dub2/drupal-7.12/includes/module.inc:0
[Mon Mar 19 00:55:33 2012] [warn] [client 89.184.165.55] mod_fcgid: stderr: PHP   8. rules_show_debug_output() /hum/userdata/xx/dub2/sites/all/modules/rules/rules.module:1201

Cleaning APC-cache did not solve the problem. Trying to clean drupal cache with drush (drush cache-clear all) rendered following error:

WD php: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.access_exposed' in 'field list': SELECT base.id[error]
AS id, base.name AS name, base.label AS label, base.plugin AS plugin, base.active AS active, base.weight AS weight, base.status AS
status, base.dirty AS dirty, base.module AS module, base.access_exposed AS access_exposed, base.data AS data
FROM 
{rules_config} base
WHERE  (base.plugin = :db_condition_placeholder_0) AND (base.active = :db_condition_placeholder_1) ; Array
(
    [:db_condition_placeholder_0] => reaction rule
    [:db_condition_placeholder_1] => 1
)
 in EntityAPIController->query() (line 152 of
/hum/userdata/xx/dub2/sites/all/modules/entity/includes/entity.controller.inc).
Drush command terminated abnormally due to an unrecoverable error.                                                                [error]
drupalycious’s picture

Hello,

I just updated to rules 2.1 and I obtain the same blank page with the warning:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.access_exposed'...

as Fago said in the comment #1 you just have to run the update.php it will update your database and the website will come to a normal state with no blank page or warning.

It means that as soon as you reach the blank page with the warning, you have to go to your browser address bar and type update.php after your domain name:
if your website is mysite.com then you type mysite.com/update.php, then you run the proposed updates for rules and the other modules and you clean the caches.

Then everything should be working properly.

coert’s picture

I got it solved after multiple attempts of running update.php. Directly after installing Rules 2.1 update.php says there were no pending updates. Hard refreshing my website gave me the white screen. Looking at the db-logs (admin/reports/dblog) showed there were 3 orphaned actions, advising me to delete them. So I deleted them in the actions settings page (admin/config/system/actions), you just follow the link from the log page. Then returned to update.php, there were 3 pending updates available again. I ran them, and then it was finally ok.

daffie’s picture

I have had the same problem. I got it solved by removing the commerce module.

isak_manresa’s picture

The same solution as #7 works for me

selamtbobo’s picture

Same issue on my sites. Comes to Rules module because of trying to install Commerce module.

jackalope’s picture

Same issue here, though I couldn't manage the solution in #7. Reverted to Rules 2.0 instead.

mitchell’s picture

Title: blank page after installing rules 2.1 » Upgrading from 2.0 to 2.1 can cause database errors
Component: Miscellaneous » Rules Engine
Assigned: trotsak » Unassigned

Please track down the bug and update the issue status.

forssto’s picture

I can confirm that this also happens in my environment. Commerce module also in use.

marty2081’s picture

Had the same eror here after updating to Rules 2.1. Just running update.php fixed it.

mitchell’s picture

Can other users please confirm that running update.php after upgrading solves this? That is the expected workflow.

NathanM’s picture

No. I ran upgrade.php around 5 or 6 times and it kept saying no updates needed to be applied.

kerios83’s picture

#16 After deleted rules folder and replace it by rules 2.1 and run update.php I get:

3 pending updates
rules module
7207 - Flush all caches. 
7208 - Flush all caches to update the data_is_empty condition info. 
7209 - Creates a flag that enables a permission for using components.

I run those updates and everything works fine. However you can try to flush cache.

daffie’s picture

@ kerios83

Go to admin/config/development/performance and click on Clear all caches.

kerios83’s picture

#18 on my site everything works fine, BTW

However you can try to flush cache.
rtdean93’s picture

This has occured for me and I cannot recover. Even after reverting back to Rules 2.0 my site is hosed with an error....

Error messagePDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.access_exposed' in 'field list': SELECT base.id AS id, base.name AS name, base.label AS label, base.plugin AS plugin, base.active AS active, base.weight AS weight, base.status AS status, base.dirty AS dirty, base.module AS module, base.access_exposed AS access_exposed, base.data AS data FROM {rules_config} base WHERE (base.name IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => commerce_shipping_method_ups ) in EntityAPIController->query() (line 152 of /home/bobby/workspace/blueline/www/sites/all/modules/contrib/entity/includes/entity.cont

this also affects Drush so I can't revert my DB. Any solutions?

mrfelton’s picture

I'm also getting this problem trying to upgrade rules to 2.1. I'm using aegir to perform the upgrade. The aegir logs indicate that the 3 rules updates ran successfully (7207, 7208 and 7209), and that the error occurred when one of our custom moudle's update hook ran just after the rules one which attempted to disable some rules using the following:

/**
 * Ensure that Og Rules are disabled.
 */
function sac_chapter_update_7001(&$sandbox) {
  // Make sure the rules created by og have been taken into account
  drupal_flush_all_caches();

  // Deactivate default og email sending rules
  $rules_config = rules_config_load('rules_og_member_active');
  $rules_config->active = FALSE;
  $rules_config->save();

  ...
}

Only way I could get the update to run successfully was to remove this update hook.

Ogredude’s picture

I was having exactly this same issue. When I ran update.php, it failed with the same PDO error. Drush update claimed no updates were needed.

I finally ended up adding the column manually from the MySQL console based on the migration in rules.install. That fixed it.

senpai’s picture

Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Fixed

Downgrading this one to normal, and marking it as fixed.

I was just able to reproduce this bug on a client's D7.14 site running Rules 7.x-2.1, and the rules tables had not been updated with update.php as they should have been because another bug in another module was crashing the update.php script and causing it to abort prematurely. Fixing/removing the bugs caused Rules to successfully update it's tables on the next pass, thus nullifying this bug report.

There's nothing that needs to be fixed in the Rules module. I think this bug is caused by other modules interfering with Rule's ability to simply do it's thang.

xibun’s picture

@Senpai: which third party module caused the bug?

senpai’s picture

@xibun, in this case, it was custom code, but in other examples above, a contrib module seems to be causing the same exact problem.

lazysoundsystem’s picture

Just to note: I had this issue when updating the Media module at the same time. Updating them separately avoided the issue.

Status: Fixed » Closed (fixed)

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

girishmuraly’s picture

@senpai any symptom of what we need to check to debug this please? I am maintaining a huge distribution and finding out whats causing this problem is challenging, and is preventing me from doing the upgrade now. Stuck on version 2.0.

hgneng’s picture

#7 works for me too.

senpai’s picture

Component: Rules Engine » Rules Core

@girishmuraly in comment #28, you need to determine which other module is causing an error(s) during the update.php process, and either remove it or fix it. Debugging 101: Try getting rid of the Rules module and seeing what happens during the next run-through...

senpai’s picture

Issue summary: View changes

have remembered