Seems there is a bug with the memcache_admin module on the newly released 7.x-1.6 version of this module.Steps to reproduce, on a clean Drupal 7 site:
drush dl memcache
drush en -y memcache
drush en -y memcache_admin
drush cc all
I get hit with:
PHP Fatal error: Call to undefined function dmemcache_object_cluster() in /Users/thomaswilhelm/Sites/drupal-7.43/sites/all/modules/memcache/memcache_admin/memcache_admin.module on line 63
Fatal error: Call to undefined function dmemcache_object_cluster() in /Users/thomaswilhelm/Sites/drupal-7.43/sites/all/modules/memcache/memcache_admin/memcache_admin.module on line 63
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined function dmemcache_object_cluster() in /Users/thomaswilhelm/Sites/drupal-7.43/sites/all/modules/memcache/memcache_admin/memcache_admin.module, line 63
Comment | File | Size | Author |
---|---|---|---|
#8 | undefined-function-dmemcache_object_cluster-2856140-8.patch | 760 bytes | kevinn |
Comments
Comment #2
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commentedPlease review the documentation on how to install/enable memcache.
It is NOT enough to just enable the modules. You have to configure settings.php properly. From the EXAMPLES section:
Comment #3
ThomWilhelm CreditAttribution: ThomWilhelm commentedOk no worries Jeremy, just with the previous version I didn't get any fatal errors like this when I didn't have memcache setup locally, I'd get a few warnings such as the below but that was about it:
WD memcache: Failed to connect to memcache server: 127.0.0.1:11211
I'll adjust my settings locally to prevent this from happening, wouldn't usually expect this to fire a fatal error about a function not being declared though.
Comment #4
brentratliff CreditAttribution: brentratliff as a volunteer commentedI agree, this shouldn't throw a fatal error. I don't even have memcache enabled and this update kills my site. If it's just in the codebase, the error exists.
Comment #5
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commentedIf you're seeing the fatal, you must have memcache_admin enabled. Regardless, agreed, we can handle this sort of misconfiguration more gracefully. Re-opening.
Comment #6
brentratliff CreditAttribution: brentratliff as a volunteer commentedThanks Jeremy, good call. I did still have memcache admin enabled. Makes sense, I guess I should have actually read the error more closely.
Comment #7
IrishAdo CreditAttribution: IrishAdo commentedAny Idea how I can disable this module as I get the error on all pages and in the command line
> drush dis memcache_admin
PHP Fatal error: Call to undefined function dmemcache_object_cluster() in.....
Comment #8
kevinn CreditAttribution: kevinn commentedMaybe this patch will do it?
Comment #9
brentratliff CreditAttribution: brentratliff as a volunteer commentedI had memcache disabled before the update and used drush to disable memcache admin after the update. Did you try to disable memcache first and then admin via drush? You could also set the system table record to 0 for both modules via SQL. It's not ideal, but better than your site being down.
Comment #11
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commented@kevinn yes, that solves it. I also added a hook_requirements() implementation to try and avoid this misconfiguration, and to complain in the Status report if already enabled.
Comment #12
fubarhouse CreditAttribution: fubarhouse commentedI'm very much looking forward to this making it into a release, does anybody have an estimated date of release for this patch?
Comment #13
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commentedThere is no planned release at this time. Generally this will happen after we collect one or more critical bug fixes, and/or have added some new features. At this time this is the only change that's been committed since the last release, and it's not generally critical enough to warrant a release for it alone.
Comment #15
Elijah LynnThis commit was added after release 7.x-1.6 and looks like it will be in 7.x-1.7.
http://cgit.drupalcode.org/memcache/commit/?id=25224fbc5486e14bbfeafc324...
http://cgit.drupalcode.org/memcache/log/?showmsg=1&h=7.x-1.x
Comment #16
dullarobin CreditAttribution: dullarobin as a volunteer commented@kelvin #8, patch working fine
thanks
Comment #17
newmediajosh CreditAttribution: newmediajosh commentedFYI I believe the confusion also comes from the community documentation:
https://www.drupal.org/node/1131468
Step 4 is "Download and install the memcache module."
Step 7 is "Edit settings.php to make memcache the default cache class."
When I installed the module, I instinctively enabled the admin interface as well because there's nothing referencing it in the doc. Then I go the crash.
Should the community doc be updated? I've never done that before but I'm happy to give it a go if it's the right thing to do.
Comment #18
hambil01 CreditAttribution: hambil01 commented@kelvin #8, patch working fine
thanks
Comment #19
DarrellDuane CreditAttribution: DarrellDuane as a volunteer and commentedPlease re-open this case and apply this patch and make a new release. I am having this problem when I enable new modules and clear caches via the web interface to my Drupal 7 site.
Comment #20
jim22 CreditAttribution: jim22 commentedSame issue.
Thanks @kevinn. Patch #8 working for me.
Comment #21
thetwentyseven CreditAttribution: thetwentyseven commentedWithout the patch: Remove the module files. Download module_missing_message_fixer module, and run in the command line 'drush mmmff --all'. Clear the cache, and then you can put back the module folder if you want.
Comment #22
Kevin Morse CreditAttribution: Kevin Morse commentedPatch #8 does the trick. Any reason this isn't in the release candidate?
Comment #23
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commentedThanks for the head's-up -- a few of the earlier commits to this release were missing from the -rc1 release notes, but are now included in the official release notes for 7.x-1.7.