Hi,

I just tried to update Rules 2.3 to 2.4 via drush up and got the following fatal error:

Project rules was updated successfully. Installed version is now 7.x-2.4.
Backups were saved into the directory /home/www/drush-backups/drupaldev/20130916203341/modules/rules. [ok]
PHP Fatal error: Class 'RulesEventHandlerEntityBundle' not found in /home/www/dev/sites/all/modules/rules/modules/node.rules.inc on line 147
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Class 'RulesEventHandlerEntityBundle' not found in
/home/www/dev/sites/all/modules/rules/modules/node.rules.inc, line 147
The external command could not be executed due to an application error. [error]
Backups were restored successfully.

Regards,

Tobi

Comments

FanisTsiros’s picture

Same error here but with Update manager (from inside drupal administration). Site was completly broken. Error identified from server error log file.

[client xx.xx.xx.xx] mod_fcgid: stderr: PHP Fatal error: Class 'RulesEventHandlerEntityBundle' not found in /var/www/vhosts/xxxxxxxxx/xxxxxxxx.com/sites/all/modules/rules/modules/node.rules.inc on line 147, referer: ...

FanisTsiros’s picture

Title: Update with drush not possible » Fatal Error after upgrade to 7.x-2.4
Version: 7.x-2.3 » 7.x-2.4
Priority: Normal » Critical

Confirmed this error ocurs also with manual downloading new version.

[client xx.xx.xx.xx] mod_fcgid: stderr: PHP Fatal error: Class 'RulesEventHandlerEntityBundle' not found in /var/www/vhosts/xxxxxxxxx/xxxxxxxx.com/sites/all/modules/rules/modules/node.rules.inc on line 147, referer: ...

FreeFox’s picture

Title: Fatal Error after upgrade to 7.x-2.4 » Update with drush not possible
Version: 7.x-2.4 » 7.x-2.3
Priority: Critical » Normal

Exact the same error. Here my log:

[web01]# dr up
Name Installed Version Proposed version Message
Rules (rules) 7.x-2.3 7.x-2.4 Update available

Update information last refreshed: Mon, 09/16/2013 - 22:28
Code updates will be made to the following projects: Rules [rules-7.x-2.4]

Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): y
Project rules was updated successfully. Installed version is now 7.x-2.4.
Backups were saved into the directory /root/drush-backups/xxx/20130916210353/modules/rules. [ok]
PHP Fatal error: Class 'RulesEventHandlerEntityBundle' not found in /web/drupal7/xxx/sites/all/modules/rules/modules/node.rules.inc on line 147
PHP Stack trace:
PHP 1. {main}() /usr/share/pear/drush/drush.php:0
PHP 2. drush_main() /usr/share/pear/drush/drush.php:16
PHP 3. _drush_bootstrap_and_dispatch() /usr/share/pear/drush/drush.php:61
PHP 4. drush_bootstrap_to_phase() /usr/share/pear/drush/drush.php:81
PHP 5. drush_bootstrap() /usr/share/pear/drush/includes/bootstrap.inc:308
PHP 6. _drush_bootstrap_drupal_full() /usr/share/pear/drush/includes/bootstrap.inc:185
PHP 7. drupal_bootstrap() /usr/share/pear/drush/includes/bootstrap.inc:936
PHP 8. _drupal_bootstrap_full() /web/drupal7/xxx/includes/bootstrap.inc:2218
PHP 9. module_invoke_all() /web/drupal7/xxx/includes/common.inc:5141
PHP 10. call_user_func_array() /web/drupal7/xxx/includes/module.inc:895
PHP 11. rules_init() /web/drupal7/xxx/includes/module.inc:895
PHP 12. rules_invoke_event() /web/drupal7/xxx/sites/all/modules/rules/rules.module:12
PHP 13. rules_get_cache() /web/drupal7/xxx/sites/all/modules/rules/rules.module:969
PHP 14. RulesEventSet::rebuildEventCache() /web/drupal7/xxx/sites/all/modules/rules/rules.module:333
PHP 15. rules_fetch_data() /web/drupal7/xxx/sites/all/modules/rules/includes/rules.plugins.inc:761
PHP 16. module_implements() /web/drupal7/xxx/sites/all/modules/rules/rules.module:216
PHP 17. module_load_include() /web/drupal7/xxx/includes/module.inc:740
PHP 18. require_once() /web/drupal7/xxx/includes/module.inc:330
PHP 19. module_load_include() /web/drupal7/xxx/sites/all/modules/rules/rules.rules.inc:12
PHP 20. require_once() /web/drupal7/xxx/includes/module.inc:330
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Class 'RulesEventHandlerEntityBundle' not found in /web/drupal7/xxx/sites/all/modules/rules/modules/node.rules.inc, line 147
The external command could not be executed due to an application error. [error]
Backups were restored successfully.

siefca’s picture

Priority: Normal » Critical

Changing to critical since it makes remote installations (managed by drush) totally unmaintanable.

fago’s picture

Status: Active » Closed (duplicate)

As people noted this happens not only with drush, it seems to be a general problem. So let's handle it in #2090511: <7.x-2.4 breaks site with "Fatal error: Class 'RulesEventHandlerEntityBundle' not found".

dema501’s picture

I've updated rules on my env
All works fine!
I did:

1) drush dl registry_rebuild
2) drush @env up rules
3) drush @env rr
4) drush @env cc all
onelittleant’s picture

This sequence of steps worked for me in drush (note the 'drush dl' instead of 'drush up'):

drush dl registry_rebuild
drush dl rules-7.x-1.4
drush rr
drush updb
drush cc all
s0s’s picture

Running update.php did the trick for me :)

andros’s picture

I just load all my updates still without drush the server and use update.php most of the times.

After updating to this module i couldn't login in on some sites, nothing worked even update.php was impossible because i was logged out.

Only drush updb worked.

XTCHost’s picture

Version: 7.x-2.3 » 7.x-2.5

Error: Class 'RulesEventHandlerEntityBundle' not found in /home/user/public_html/sites/all/modules/rules/modules/node.rules.inc, line 147

I am still getting the above problem on many of my sites.

However, I have just updated to rules-7.x-2.5, on a fairly new basic site that has very few modules, without any problems.

Both sites are on the same server and updates where tried using drush

fidjetman’s picture

Error: Class 'RulesEventHandlerEntityBundle' not found in /var/www/html/sites/all/modules/rules/modules/node.rules.inc on line 147

I too still cannot update with drush. Trying to update from Rules 7.x-2.3 to 7.x-2.5.

mhamed.hmimid’s picture

hello
i ve got the same error after updating the rules module
but after manually copied the rules dev version to replace the rules module
and after that
gone to drush
gone to update the db:using the command :
drush updatedb
and all ok
meaning that the update of the rules modules is not done onthe database level

nzcodarnoc’s picture

Hey there,

I keep bumping into this problem as I update sites.

Here's what I do (based on #7)

drush dl registry_rebuild
drush rr
drush up
keltic’s picture

Actually, should be:

drush dl registry_rebuild
drush rr
drush updb
bluesomewhere’s picture

#12 worked for me, seems a solid stopgap for those of us needing to upgrade. Specifically:

drush dl rules
drush updb
PI_Ron’s picture

#7 worked for me, however changed drush dl rules-7.x-1.4 to the latest 2.x version:

drush dl registry_rebuild
drush dl rules-7.x-1.4
drush rr
drush updb
drush cc all
Anonymous’s picture

Followed #16, only change was need to include version 7.x-2.5 instead of 7.x-1.4. Drush picked up on it and gave me an option to switch to latest release (nice feature).

Also, got error after Drush up now, but does not seem to affect the update. Could be unrelated:

PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0

Ran Drush up a second time and no error reported.

baronvoninternet-1’s picture

Im hoping to get an answer soon, this just happened to me and I do not understand what you guys mean in the solutions posted. I see that format everywhere and it makes my head hurt more and my stress levels rise. I hate not understanding stuff :) so...

This popped up when I did a module update followed by a database update (What is drush?? A Reggae tribute to the all time best Canadian Power Trio?) the only thing I can think of as a cause was nodemaker modules, which are disabled, but I still chose to update them. now the site is down and I can see it now, a flood of germans banging down my door vanting zere zeite back up again :)

This is line 147... so what is wrong with it
class RulesNodeEventHandler extends RulesEventHandlerEntityBundle {

As a newb, all I can get out of this is there is a missing RulesEventHandlerEntityBundle

perhaps the whole paragraph??

class RulesNodeEventHandler extends RulesEventHandlerEntityBundle {

  /**
   * Returns the label to use for the bundle property.
   *
   * @return string
   */
adixon’s picture

The registry rebuild command from drush was giving me a php fatal error, so none of the above solutions worked for me.

Here's what did work:

1. manually disable the rules module in sql, "update system set status = 0 where name IN ('rules','rules_admin)"
2. drush updatedb
3. manually re-enable the rules modules.

ram4nd’s picture

#15 worked

rwoldezghi’s picture

#19, manually setting the module status in db work + drush updb. thanks!

trotsak’s picture

#15 thank you!

extrarumeno’s picture

#8 Thank you!

andrewbenkard’s picture

#15 worked for me, thanks all.

srikanth.g’s picture

Issue summary: View changes

I have updated MEDIA module and ADMIN_MENU module successfully using Drush.
But the command "drush up rules" gives me the error below:
Drush command terminated abnormally due to an unrecoverable error. Error: Class 'RulesEventHandlerEntityBundle' not found
I am upgrading my drupal 7.22 to 7.37(latest available as on 19-may-2015)

vishal.sirsodiya’s picture

I have followed all user's comments. But my product is not resolved.
i am facing below errors :-

Fatal error: Class 'Drupal\Core\StringTranslation\PluralTranslatableMarkup' not found in D:\site\test-website\docro
ot\core\includes\common.inc on line 133
Drush command terminated abnormally due to an unrecoverable error. ←[31;40m←[1
m[error]←[0m
Error: Class 'Drupal\Core\StringTranslation\PluralTranslatableMarkup' not found in
D:\site\test-website\docroot\core\includes\common.inc, line 133

Please help me.

Fazeela_ma’s picture

#26 , I've the same issue.