Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
PHP Fatal error: Class 'EntityCacheNodeController' not found in ncludes/common.inc on line 7697
If I disable the module on a running system and clear cache, I get the above error
It causes WSOD
Comment | File | Size | Author |
---|---|---|---|
#9 | entitycache-php_fatal_error-1786026-9.patch | 476 bytes | fuerst |
Comments
Comment #1
fuerst CreditAttribution: fuerst commentedMe too. It was a development machine so I solved it by replacing the complete database.
If that is not an option you may
truncate table registry_file;
in your database. See first comment in http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/regis...Comment #2
phayes CreditAttribution: phayes commentedMarking as major priority as it blocks all tests from being run on a site.
Comment #3
Phizes CreditAttribution: Phizes commentedRegistry Rebuild will probably also be able to help you if you are stuck with this issue, it's also just a workaround though.
Comment #4
bartlomiej CreditAttribution: bartlomiej commentedI have the same problem after disabling the module.
Comment #5
zuernBernhard CreditAttribution: zuernBernhard commentedI had the same issue here. The reason was: Memcached. While i had flushed file_registry I still got this Error. After flushing memcached all went fine.
In my local Terminal (zsh on OSX) I use:
'echo "flush_all" | /bin/netcat 127.0.0.1 11211'
to flush memcached.
Comment #6
rooby CreditAttribution: rooby commentedI'm not using memcache and so far drush rr and truncating registry_file table haven't helped.
[edit] Scratch that. My problem was user error.
Comment #7
quironHi all,
is any reason to not including this to the uninstall process?
thanks
Comment #8
skwashd CreditAttribution: skwashd commented@quiron if someone proposes a patch for adding something to
hook_uninstall()
I'll look at it.Comment #9
fuerst CreditAttribution: fuerst commentedRunning
registry_update()
should be enough because this will remove files from the registry table(s) which are no longer available because the module providing it got disabled.Comment #10
fuerst CreditAttribution: fuerst commentedSet issue to Needs review as well.
Comment #11
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI no longer get the error
Comment #12
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedComment #13
drummDrupal.org nearly ran into this. It hit staging. Since this unexpectedly & swiftly takes down the site, marking it critical.
Comment #14
RobLoachShould this also go in _enable/_install?
Comment #15
catchIs this a duplicate of #2441965: Broken updates due to Classes living in .module files?
Comment #16
catchI think it is, see you over there.
Comment #17
joelpittetI'm using both of these patches in production. (though my commit log message on why is not helpful, sorry)
Comment #18
philsward CreditAttribution: philsward commentedThe dev as of 2016-Aug-15 or later, should have the fixes necessary to circumvent this issue.
Comment #19
arunkmishra CreditAttribution: arunkmishra commentedI'm using these patches in production. helpful for me.
diff --git a/entitycache.module b/entitycache.module
index 66366e0..bd4c648 100644
--- a/entitycache.module
+++ b/entitycache.module
@@ -212,3 +212,23 @@ function entitycache_user_logout($account) {
function entitycache_user_login(&$edit, $account) {
cache_clear_all($account->uid, 'cache_entity_user');
}
+
+/**
+ * Workaround for update 7.x-1.3 and later breaking existing sites, since the
+ * class autoloader cannot find the classes previously defined in this file but
+ * now are moved into individual files under 'includes' folder.
+ *
+ * @see https://www.drupal.org/node/2441965#comment-10558568
+ */
+if (!class_exists('EntityCacheControllerHelper')) {
+ require_once __DIR__ . '/includes/entitycache.entitycachecontrollerhelper.inc';
+}
+if (!class_exists('EntityCacheDefaultEntityController')) {
+ require_once __DIR__ . '/includes/entitycache.defaultentitycontroller.inc';
+}
+if (!class_exists('EntityCacheNodeController')) {
+ require_once __DIR__ . '/includes/entitycache.node.inc';
+}
+if (!class_exists('EntityCacheUserController')) {
+ require_once __DIR__ . '/includes/entitycache.user.inc';
+}