Just ran drush up which updated rules 7.x-2.0-beta1 to 7.x-2.0-beta2 successfully. Site now displays WSOD, cannot run drush up anymore and error_log shows:

[Thu Jun 16 18:45:47 2011] [error] [client x.x.x.x] PHP Fatal error:  Class 'EntityAPIControllerExportable' not found in /var/www/html/drupal-7.2/sites/all/modules/rules/includes/rules.core.inc on line 11, referer: http://domain.com/

Interestingly enough, Entity module was still at 7.x-1.0-beta8 and was not updated. Entity updated by hand to 7.x-1.0-beta9 but this had no effect.

Rolled back to rules-7.x-2.0-beta1 and everything was happy.

Tried drush up again with the same results.

Any ideas?

Comments

rodrigoaguilera’s picture

Component: Rules Core » Rules Engine

subscribe

hellomobe’s picture

+1 just downloaded and tried to install dev versions for rules and entityAPI.

athens72’s picture

same thing here:

Using Drupal 7.2, Drupal Commerce latest dev, latest dev of EntityAPI, Rules, Views, Commerce PayPal, Address Field, and Ctools. I tried to edit my payment methods. Anymore information I can provide please let me know.

Letharion’s picture

Status: Active » Postponed (maintainer needs more info)

I had this problem until I upgraded to -dev of entity api.
Currently running -dev of rules and entity api.
Please try and report back.

fago’s picture

7.x-2.0-beta2 requires entity API beta9 or later.

You should upgrade rules and the entity API module at the same time, as described here. I've added a separate note to this on the project page.

waverate’s picture

fago,

Thank you. This works.

version = "7.x-1.0-beta9"
core = "7.x"
project = "entity"
datestamp = "1308239815"

version = "7.x-2.0-beta2"
core = "7.x"
project = "rules"
datestamp = "1308241620"

And then update.php.

I am not sure why entity did not update with drush when I tried this yesterday.

waverate’s picture

Status: Postponed (maintainer needs more info) » Fixed
salientknight’s picture

I upgraded to the newest version of both and I am still getting the same error. .../rules.core.inc on line 11

Any other fixes for this?

-=Sal=-

wjaspers’s picture

Status: Fixed » Active

Still see the Fatal error with both latest.

subbing.

softmax’s picture

I confirm to that this is not fixed with #6-comment-referenced versions, although I changed to the new versions simultaneously and called the update.php once after having changed both (! http://drupal.org/project/entity#note) to:

version = "7.x-1.0-beta9"
core = "7.x"
project = "entity"
datestamp = "1308239815"

version = "7.x-2.0-beta2"
core = "7.x"
project = "rules"
datestamp = "1308241620"

rfay’s picture

I have this with latest rules and entity.

rfay’s picture

This is a catch-22 situation, because the change to Entity module actually prevents the system from bootstrapping to a high enough level that you can clear the cache and fix the problem.

I created Registry Rebuild to get myself out of this jam (with this exact problem). Please try it and see if it solves your problem.

berenddeboer’s picture

That gave me:

Fatal error: Class 'DrupalDefaultEntityController' not found  in .../modules/comment/comment.module on line 1665
berenddeboer’s picture

For me the only way out was to hack every file that filed to load and include the file that had the missing controller. I got the one above, and another for DrupalCommerceEntityController.

rfay’s picture

@berenddeboer, if you're saying that you tried Registry Rebuild and it didn't work for you (and that's what you needed) I would appreciate it if you'd create an issue over there, preferably with a broken database and a tarball of your codebase. I'd take a look at it.

fago’s picture

hm, that's odd - in my tests the suggested method worked fine. We could really need a low-level registry-rebuild helper here. Does the registry-rebuild module help?

Else we could add a workaround to rules that fixes the problem at least for the dev version. E.g. we could add something like

if (!class_exists('EntityAPIControllerExportable')) {
  module_load_include('inc', 'entity', 'includes/entity.controller');
}

to rules.core.inc or maybe better to the rules_autoload() function.

willieseabrook’s picture

I confirm that running registry_rebuild as suggested by @rfay in #12 does correct the problem.

Thank you.

bitsgrecco’s picture

I had same problem for:
version = "7.x-1.0-beta9"
core = "7.x"
project = "entity"
datestamp = "1308239815"

version = "7.x-2.0-beta2"
core = "7.x"
project = "rules"
datestamp = "1308241620"

and finally found a way to fix it.

The ' Class EntityAPIControllerExportable not found' problem comes from old cached data, so once you are able to empty all caches and invoke the hook to flush caches in all modules, problem is away.
This also fixed another ugly error I had when a commerce cart rule was invoked on drupal bootstrap.

To do so, empty manually from your database the 'cache' table and all 'cache_XXX' tables.
Then, if you have devel module enabled, go to url
http://HOST/devel/cache/clear

This fixed for me, and now the site is up again.

softmax’s picture

Me too can confirm that running registry_rebuild as suggested by @rfay in #12 does correct the problem.

Thnx

OldAccount’s picture

Upgrading to Entity 7.x-1.0-beta9 and then using Registry Rebuild (mentioned in #12) worked for me. Spent a day trying to troubleshoot random 500 internal server errors -- glad to finally figure it out.

tripper54’s picture

I had the same problem. Registry rebuild module didn't work, but manually clearing all the cache_xx tables in the DB did.

rfay’s picture

Just FYI, Registry Rebuild does in fact do a complete cache clear after it gets the system bootstrapped enough to do so, so reports like #21 are quite confusing.

wjaspers’s picture

I think some people are missing the idea that Registry Rebuild needs to be explicitly called--it won't do anything just by installing it.

berenddeboer’s picture

Status: Active » Fixed

I can confirm that the 1.1 issue fixed all my problems.

Just checked with Willie, and he also used 1.1 actually (we were working on the same code base).

BrightBold’s picture

Thanks @rfay - Registry Rebuild saved me.

waverate’s picture

Is Registry Rebuild as a separate module a long term solution? Or will this be taken car of in Rules, Entity or Core?

rfay’s picture

@waverate, this is a long-term problem in Drupal. I don't think rules or entity can deal with it. It's possible it could be fixed in core. The most promising solution is a new drush command though, as suggested in #1199104: Registry Rebuild should be a drush command: Try 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_DATABASE.

skilip’s picture

Upgrading Entity API to the lates version (7.x-1.0-beta9) fixed it for me.

geerlingguy’s picture

I can also confirm that the Registry Rebuild module fixes the problem for me.

nfriend’s picture

Thanks @rfay - Registry_Rebuild worked as advertised!

_Neil

haggster’s picture

Flushing cache after updating to Rules 7.x-2.0-beta2 and Entity to 7.x-1.0-beta9 worked for me!

RKS’s picture

I got this same Fatal Error after updating Rules + Entities. After updating I didn't do anything except go to check the Rules and got this. After that I just backed out, went over to Performance and cleared the cache. After that I ran update again just to make sure and everything works perfectly now.

Even though it works perfect for me now, I would say in newer devs this should be looked at. Not faulting or chastising, I only wanted to let others know clearing the cache and update worked for me as well as those already posted above.

kifuzzy’s picture

sign

foroysund’s picture

@rfay: Thank you! I had this exact problem and a registry rebuild saved my page! :-)

TommyChris’s picture

#12 fixes the problem!

PetarB’s picture

Registry Rebuild in #12 solved this issue for me.

bisonbleu’s picture

Tried manually deleting all cache tables in database. No apparent result.
Used Registry Rebuild as suggested in #12. No apparent result.
I deleted the entity & rules directories. Aha, my site is finally back.
Installed dev versions for both Entity and Rules (20110809).
All is back to normal now... so it seems.
Thanks.

anavarre’s picture

Version: 7.x-2.0-beta2 » 7.x-2.0-beta3

I still see this issue with beta3. Almost like in #37, while trying to disable any reference to rules and/or entity and testing registry_rebuild did nothing this time, removing the rules directory (only) finally put the site back on track.

Status: Fixed » Closed (fixed)

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

end user’s picture

Like to add that I just did a fresh install with all the latest verions of the modules and get this error. Manually uninstalling rules in the db fixes the problem but even trying to use non dev versions I get this error every time I try to install rules.

I tried the registry rebuild but that failed for me even though I got this message

DRUPAL_ROOT is /home/altgrow/domains/altgrow.com/public_html.
Bootstrapping to DRUPAL_BOOTSTRAP_SESSION
Doing registry_rebuild() in DRUPAL_BOOTSTRAP_SESSION
Bootstrapping to DRUPAL_BOOTSTRAP_FULL
Doing registry_rebuild() in DRUPAL_BOOTSTRAP_FULL
Flushing all caches
There were 409 files in the registry before and 409 files now.
If you don't see any crazy fatal errors, your registry has been rebuilt.

Fatal error: Class 'EntityAPIControllerExportable' not found in /home/altgrow/domains/altgrow.com/public_html/sites/all/modules/rules (2)/includes/rules.core.inc on line 11

Edit:

I uninstalled Rules and Entity and fully rmoved them. I then installed the following versions with no problems.

7.x-1.0-beta10 tar.gz (75.39 KB) | zip (91.41 KB) 2011-Jul-12
7.x-2.0-rc2 tar.gz (148.67 KB) | zip (178.22 KB) 2011-Sep-18

droz72’s picture

Status: Closed (fixed) » Active

I am still having this issue.

Though the error is now in line 17:

Fatal error: Class 'EntityAPIControllerExportable' not found in /public_html/sites/all/modules/rules/includes/rules.core.inc on line 17

The site is using:

  • Entity: 7.x-1.0-beta11, 10/25/2011
  • Rules: 7.x-2.0, 10/11/2011

Do I need to revert to older versions of the modules?

fago’s picture

Status: Active » Closed (fixed)

Read the issue, i.e. #12

earthangelconsulting’s picture

I found that the registry_rebuild wasn't necessary (or rather, it didn't fix the problem by itself)

Manually putting in the latest stable release of "entity" (which at this time is 7.x-1.0-rc2 ) and latest stable release of "rules" (which at this time is 7.x-2.1 ) is all that was required, to make this issue go away.

though of course i ran update.php afterwards, since i had manually replaced the module files. and i ran registry_rebuild anyhow (didn't see how it could hurt!)

a successful run of registry_update looks something like this:

DRUPAL_ROOT is /home/foobar/example.ca.
Bootstrapping to DRUPAL_BOOTSTRAP_SESSION
Doing registry_rebuild() in DRUPAL_BOOTSTRAP_SESSION
Bootstrapping to DRUPAL_BOOTSTRAP_FULL
Doing registry_rebuild() in DRUPAL_BOOTSTRAP_FULL
Deleted 3 stale files from registry manually.Flushing all caches
There were 498 files in the registry before and 495 files now.
If you don't see any crazy fatal errors, your registry has been rebuilt.

Anonymous’s picture

I had issues on my multi-site setup and after trying loads of things, the only thing that stopped the drush error message (and hence actually allowed me to use drush again) was to remove the rules module directory. This then causes problems because it Drupal thinks it is enabled, but the files aren't there... Anyway, the overall solution for me was to completely remove (and uninstall) the Rules and Entity API modules and then download the latest stable version of Entity API (7.x-1.0-rc2), and the latest dev of Rules (7.x-2.x-dev as of 21st May 2012), and thankfully they played nice together.

In case this helps other people, here are some other weird error messages I got along the way:

PHP Fatal error: Class 'RulesEventSet' not found in /home/jack/workspace/website/sites/all/modules/rules/rules.module on line 257

and

PHP Fatal error: Call to undefined function db_query() in /home/jack/workspace/website/includes/cache.inc on line 357

drzraf’s picture

Version: 7.x-2.0-beta3 » 7.x-2.x-dev
Priority: Normal » Major
Status: Closed (fixed) » Active

it's a blocker for my 6.x -> 7.x upgrade (installed rules 7.x-2.x, entity 7.x-1.x)
php registry_rebuild.php / drush rr, before or during the update.php do not change anything:
Class 'EntityAPIControllerExportable' not found in /sites/all/modules/rules/includes/rules.core.inc on line 17

Worse noting though:
The update process was aborted prematurely while running update #7002 in date.module :
Update #7002 : Migrated user time zones

Worse noting though:

Update #7020
Failed: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rules_dependencies' doesn't exist: SELECT rd.id AS id FROM {rules_dependencies} rd INNER JOIN {rules_config} rc ON rd.id = rc.id WHERE (rd.module IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2)) AND (rc.dirty = :db_condition_placeholder_3) ; Array ( [:db_condition_placeholder_0] => field_sql_storage [:db_condition_placeholder_1] => field [:db_condition_placeholder_2] => field_ui [:db_condition_placeholder_3] => 1 ) in rules_modules_enabled() (line 1247 of /sites/all/modules/rules/rules.module).
FreeFox’s picture

Title: 7.x-2.0-beta2 breaks EntityAPI » 7.x-2.0-beta2 (and 2.1) breaks EntityAPI

Same problem here with latest dev versions of both modules.

project = "rules"
version = "7.x-2.1+8-dev"

project = "entity"
version = "7.x-1.0-rc3+2-dev"

Ran registry_rebuild

[root@localhost registry_rebuild]# php registry_rebuild.php 
DRUPAL_ROOT is /web/drupal7/test.<br/>
Bootstrapping to DRUPAL_BOOTSTRAP_SESSION<br/>
Doing registry_rebuild() in DRUPAL_BOOTSTRAP_SESSION<br/>
Bootstrapping to DRUPAL_BOOTSTRAP_FULL<br/>
Doing registry_rebuild() in DRUPAL_BOOTSTRAP_FULL<br/>
Flushing all caches<br/>
There were 495 files in the registry before and 495 files now.<br/>
If you don't see any crazy fatal errors, your registry has been rebuilt.<br/>
[root@localhost registry_rebuild]#

When I try to drush cc I get this error:

[root@localhost modules]# drush cc
PHP Fatal error:  Class 'EntityAPIControllerExportable' not found in /web/drupal7/test/sites/all/modules/rules/includes/rules.core.inc on line 17
Drush command could not be completed.                                                                                    [error]
[root@localhost modules]#

Please help

drzraf’s picture

affected and reproducible too

mitchell’s picture

Status: Active » Closed (duplicate)

This is a Core bug, see #1029836: Registry can get hopelessly hosed. Implementing a Rules or Entity workaround wouldn't be a good use of our time. Until it is fixed in Core, use Registry Rebuild and thank @rfay.

trilok’s picture

Component: Rules Engine » Rules Core

Hi

i am getting this error

Fatal error: Class 'DrupalDefaultEntityController' not found in /home/Jiksdsptrv/public_html/modules/comment/comment.module on line 2717

drupaletteiz’s picture

Title: 7.x-2.0-beta2 (and 2.1) breaks EntityAPI » 7.7 Fatal error: Class 'EntityAPIControllerExportable' not found
Category: bug » support
Status: Closed (duplicate) » Active

I'm a beginner and trying to create a local test site on my computer from an existing website. I've copied down the files and exported the database. I ran the install local and I got this message when I got to "Set up Database":

"To start over, you must empty your existing database.
To install to a different database, edit the appropriate settings.php file in the sites folder.
To upgrade an existing installation, proceed to the update script.
View your existing site."

Something definitely needs to change because I tried looking at the existing site and it gave me this error:
Fatal error: Class 'EntityAPIControllerExportable' not found in C:\wamp\www\sites\all\modules\rules\includes\rules.core.inc on line 11

Call Stack
# Time Memory Function Location
1 0.0014 251992 {main}( ) ..\index.php:0
2 9.5727 26189192 menu_execute_active_handler( ) ..\index.php:21
3 9.5730 26190472 drupal_deliver_page( ) ..\menu.inc:518
4 9.7849 27562576 drupal_deliver_html_page( ) ..\common.inc:2437
5 10.8160 28772576 drupal_page_footer( ) ..\common.inc:2546
6 11.2042 28777328 system_run_automated_cron( ) ..\common.inc:2573
7 11.2043 28777440 drupal_cron_run( ) ..\system.module:3465
8 11.3564 29150576 module_invoke_all( ) ..\common.inc:5044
9 11.6155 29171144 call_user_func_array ( ) ..\module.inc:819
10 11.6156 29171304 rules_scheduler_cron( ) ..\module.inc:819
11 11.6182 29176344 drupal_autoload_class( ) ..\module.inc:0
12 11.6182 29176424 _registry_check_code( ) ..\bootstrap.inc:2627
13 11.6484 29720208 require_once( 'C:\wamp\www\sites\all\modules\rules\includes\rules.core.inc' ) ..\bootstrap.inc:2702

drzraf’s picture

From my experience, there's nothing you can do. In my case Registry Rebuild failed too.
Just disable rules before you import your website (or before you locally upgrade your modules).

firfin’s picture

@drupaletteiz:
You seem to have at least one totally unrelated problem. Trouble with migration (the database/update errors)
See http://drupal.org/documentation/install or issues like Moving Existing Site to New Server and Updating Core
Use search engines: 'drupal moving server' provides me with thousands of useable hits.

The Original Issue (what this thread is about) seems to be solved when using the latest versions of drupal, entityAPI and rules. Please update your install (after making -and checking- backups )

If you still have problems, use Registry Rebuild (mentioned many times above). You can also try some other solution mentioned in this thread.

If that doesn't help please open another issue, or come back here with a step-by-step explanation of how to reproduce the problem. Also mention what you have tried to fix this. Please read Tips for making a good issue report first.

Only stating you have the problem helps no one.

--EDIT fixed links

sjazaerli’s picture

Title: 7.7 Fatal error: Class 'EntityAPIControllerExportable' not found » 7.x-2.0-beta2 (and 2.1) breaks EntityAPI
Category: support » bug
Status: Active » Closed (duplicate)

I did everything you all talked about and i'm still getting the error did anyone fixed this error ever

firfin’s picture

Yes using registry rebuild, See #48. Can you provide steps to reproduce sjazaerli?

_grizly’s picture

registry_rebuild wasn't working..

$ drush rr
The registry has been rebuilt via registry_rebuild (A).                                                                                  [success]
PHP Fatal error:  Class 'EntityAPIControllerExportable' not found in /var/www/html/drupal-7.31/sites/all/modules/cer/includes/CerPresetController.inc on line 6

I checked the registry in phpMyAdmin, and the Class wasn't in the table.. so, I added it!

A quick grep of source said it was in entity.controller.inc, so I copied that entry!
sites/all/modules/entity/includes/entity.controller.inc:class EntityAPIControllerExportable extends EntityAPIController {

INSERT INTO `YOUR_DATABASE_NAME`.`registry` (
`name` ,
`type` ,
`filename` ,
`module` ,
`weight`
)
VALUES (
'EntityAPIControllerExportable', 'class', 'sites/all/modules/entity/includes/entity.controller.inc', 'entity', '0'
);
xurizaemon’s picture

Issue summary: View changes

Super old issue I know, but since it's still hitting some people apparently.

Post one D6-D7 upgrade recently, I saw a site which had Rules but not Entity enabled. drush en entity won't fix it, but setting status=1 in the system table for name="entity" and then drush rr did. If you're hitting this and drush rr isn't giving relief, try that?

rakesh.gectcr’s picture