With recent -dev I am getting the below Fatal error. The "RulesEventHandlerEntityBundle" class is available in includes/rules.event.inc but rules seems to think it is not.

Fatal error: Class 'RulesEventHandlerEntityBundle' not found in sites/all/modules/rules/modules/node.rules.inc on line 180

This is with -dev core/contrib modules.

Comments

mshepherd’s picture

Also seeing this on recent update from Rules 2.3

fago’s picture

Status: Active » Postponed (maintainer needs more info)

This probably your registry missing the file, have you run update.php without troubles?
Else you could enabling/disabling another module, what also triggers a registry update.

likewhoa’s picture

@fago the way i reproduced this and encounter this in the first place was by installing the rules modules through drush.

# drush -y dl rules-7.x-2.x-dev
# drush updb
# drush cc all
webdrips’s picture

Agree with @likewhoa; the latest dev release breaks my site in exactly the same way even with updb.

fago’s picture

drush updatedb did not clear caches for a while, I suppose it skipped the necessary registry rebuild also. See #602182: updatedb should clear cache.

With running update.php manually, no issues should occur. I'm not sure this works when you ran the update already via drush though. If not, try rebuilding the registry via in/uninstalling a module or using registry-rebuild.

webdrips’s picture

@fago registry_rebuild worked; thanks!

OnkelTem’s picture

After upgrading to this latest Rules, getting the same error message, applying registry-rebuild, site doesn't load at all: it hangs forever, showing load status and white page. Drush cc doesn't work eithger. Looks like the show just stops at rules_init().

UPDATE
Looks like Rules got into infinite loop somewhere near rules_get_cache().

OnkelTem’s picture

Priority: Normal » Critical
OnkelTem’s picture

Priority: Critical » Normal

This problem reported in #7 is actually a follow-up. Created separate issues for it: https://drupal.org/node/2054595

Exploratus’s picture

Same issue

Exploratus’s picture

Same issue

joshtaylor’s picture

Doing a drush registry rebuild fixed this issue for me.

clivelinsell’s picture

Just updated to 7.x-2.4 stable - same issue; updaters beware.

fago’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
SiddharthMantri’s picture

I am completely new to Drupal. Today, I've faced the same issue of Fatal error: Class 'RulesEventHandlerEntityBundle' not found in /home/user/public_html/sites/all/modules/rules/modules/node.rules.inc on line 147.

How do I rollback to the previous stable version. I'd appreciate all the help because I have no idea about drupal.

EDIT: Used Registry rebuild. Cannot update the databases though because it takes me to a page called Requirement problem and I cannot load any further.

jonathan1055’s picture

I had this issue when upgrading from 2.3 to 2.5. Solved by manually going to update.php.

@SiddharthMantri
I also got the 'Requirements Problem' page, but the only thing not green was a suggestion that Coder Review would run better with php code sniffer. Could not see how this is related to update.php, so I clicked the link at the bottom which said something like 'try again' and the update process continued correctly. Three updates for Rules were done and all is fine now. Hope you have the same luck.

Jonathan

Jooblay.net’s picture

Thus far using the above solutions have not worked while using $drush pm-update -y we repeatedly receive the rules error. The only solutions we have been able to validate is to $drush pm-disable rules with results in rules being disabled.

Then running $drush pm-update -y finishing the 27 odd updates including rules.

Once rules has validated with the update. We then $drush pm-enable rules + all other disabled modules as a result of $drush pm-disable rules the first time.

While rules was disabled we also ran $drush updatedb and $drush pm-update -y --no-cache Then $drush cache-clear all

At this time all sites seem stable with no errors on 75% page tests in the ui. Rules integrity checks showed no broken rules.

Important note on core update module: In order to update rules while it is disabled you must have the update module checking for updates of disabled modules. Then $drush pm-update -y should turn rules.

zach harkey’s picture

Instead of running pm-update (and messing with enabling and disabling rules and who knows how many dependent modules, etc. ), try using pm-download:

$ drush pm-download rules-7.x-2.x-dev

Allow it to overwrite your existing module:

Install location sites/all/modules/rules already exists. Do you want to overwrite it? (y/n): y
Project rules (7.x-2.x-dev) downloaded to sites/all/modules/rules.                                          [success]
Project rules contains 4 modules: rules_scheduler, rules_i18n, rules_admin, rules.

Now update the database:

$ drush updatedb

It should run the necessary updates like so:

Rules  7210  Deletes the unused rules_empty_sets variable.
 Rules  7211  Creates the "owner" column.
 Rules  7212  Make sure registry gets rebuilt to avoid upgrade troubles.
Do you wish to run all pending updates? (y/n): y
Performed update: rules_update_7210                                                                         [ok]
Performed update: rules_update_7211                                                                         [ok]
Performed update: rules_update_7212                                                                         [ok]
'all' cache was cleared in hdblz4b.dev                                                                      [success]
Finished performing updates.                                                                                [ok]
Jooblay.net’s picture

Why use rules-7.x-2.x-dev and not Rules Version: 7.x-2.5? Good tip on the drush dl... thanks:)

All our servers sites are up todate now... also found this on the rules page https://drupal.org/node/2090511

headstartcms’s picture

Where can i find the Rules 7210 , Rules 721 , Rules 7212 ? Full directory name ?
I cannot fix this website.

Rules 7210 Deletes the unused rules_empty_sets variable.
Rules 7211 Creates the "owner" column.
Rules 7212 Make sure registry gets rebuilt to avoid upgrade troubles.

headstartcms’s picture

How can i edit EDIT: Used Registry rebuild ?

headstartcms’s picture

I cannot fix the problem. What do you mean ?I clicked the link at the bottom which said something like 'try again' ? I view the code in update.php

where to make the adjustment code ?

This is the bugs i recieved.
/modules/rules_bugs/rules.module on line 333

headstartcms’s picture

Long process backup system restore to my website consume more time. Need to learn how to fix this bugs. Need some help.

Jooblay.net’s picture

Are you running drush? If you are run the following and be careful, make sure you have a good backup.

$drush pm-disable rules

Then copy ctrl + shift c on the commandline all the modules that are required from rules.

-y

Hit -y at the prompt and disable.

Then after all modules are disabled that are required and including rules. hit

$drush pm-update -y
$drush updatedb
$drush pm-update -y

Just to make sure your all up to date. Then enable all the modules by pasting in the list of modules you copied from disabling rules.

$drush pm-enable rules +all_other_modules_in_a_comma_seperated_list -y

Run this twice even 4 times to make sure all modules get enabled. You may also see a views line 141 error. Fix this by doing the same process as rules. Disable views and all dependant modules.

***********************************************

If you do not have drush running it would seem on small sites you could do the above through the user interface. this is a fix for right now.

Or you can wait for an elusive patch:) Above the rule-dev may also fix this issue.

headstartcms’s picture

I cannot access the backend admin panel. What are other solutions to solve this problem ?

Jooblay.net’s picture

Issue tags: +backend admin?

https://drupal.org/node/2090511 this link may help you out too...

What do you mean backend admin panel? Do you mean example.com/admin ?

At this time if you do not have drush, one fix fago mentioned is to hit example.com/update.php and follow the steps. If you already have a fatal error on your site from an attempted update you will have to roll back you site to a backup. Namely re-install your backups database and rules module @ sites/all/modules

Remember to clear you cache.

Hope that helps...

smcooper’s picture

Can some one tell me the correct code

absoludo’s picture

#18 worked for me on Rules 7.x-2.5

mulderjoe’s picture

Issue summary: View changes

#18 worked for me as well. I was able to download Rules 7.x-2.9

openmode’s picture

DRUPAL_ROOT is /..../.....
Bootstrapping to DRUPAL_BOOTSTRAP_SESSION
Bootstrap caches have been cleared in DRUPAL_BOOTSTRAP_SESSION
Doing registry_rebuild() in DRUPAL_BOOTSTRAP_SESSION
Bootstrapping to DRUPAL_BOOTSTRAP_FULL
Rebuilding registry via registry_rebuild_cc_all in DRUPAL_BOOTSTRAP_FULL

0001;55479deb;Firefox.app;tall, update and uninstall functions for the location_user module. */ /** * Implentation of hook_uninstall(). */ function location_user_uninstall() { // Delete user settings. variable_del('location_settings_user'); } 0001;5547a9cf;Firefox.app;tall, update and uninstall functions for the print_pdf_tcpdf module. * * @ingroup print */ /** * Implements hook_uninstall(). */ function print_pdf_tcpdf_uninstall() { variable_del('print_pdf_font_family'); variable_del('print_pdf_font_size'); variable_del('print_pdf_font_subsetting'); } 0001;5547a9cf;Firefox.app;tall, update and uninstall functions for the print UI module. * * @ingroup print */ /** * Implements hook_enable(). */ function print_ui_enable() { // Module weight db_update('system') ->fields(array( 'weight' => 1, )) ->condition('type', 'module') ->condition('name', 'print_ui') ->execute(); }

Additional uncaught exception thrown while handling exception.
Original

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.owner' 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.owner AS owner, 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 187 of /..../...../sites/all/modules/entity/includes/entity.controller.inc).

Additional

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.owner' 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.owner AS owner, 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 187 of /...../...../sites/all/modules/entity/includes/entity.controller.inc).

SseggembeMoses’s picture

#16 worked for me. Thanks man