I see several errors after I enable module.
To enable it, I just add this lines to the settings.php:
$settings['memcache']['servers'] = ['127.0.0.1:11211' => 'default'];
$settings['memcache']['bins'] = ['default' => 'default'];
$settings['memcache']['key_prefix'] = 'd8';
$settings['cache']['default'] = 'cache.backend.memcache';
The errors I see:
Catchable fatal error: Argument 2 passed to Drupal\Core\Cache\DatabaseCacheTagsChecksum::isValid() must be of the type array, null given, called in /modules/contrib/memcache/src/MemcacheBackend.php on line 168 and defined in /core/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php on line 97
Notice: Undefined property: stdClass::$tags in /modules/contrib/memcache/src/MemcacheBackend.php on line 168
Warning: Creating default object from empty value in modules/contrib/memcache/src/MemcacheBackend.php on line 123
Notice: Trying to get property of non-object in modules/contrib/memcache/src/MemcacheBackend.php on line 105
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | catchable_fatal_error-2693361-9.patch | 551 bytes | lussoluca |
Comments
Comment #2
nortmas commentedComment #3
misc commentedI had a simiular issue, but is seems to be gone now after I patched with #2701903: Tests for: Setting prefix_key is not use by memcache to get key_prefix working
Comment #4
nortmas commentedCool, thx!
Comment #5
misc commentedDid it solve your iusse @nortmas?
Comment #6
dagomar commentedThe patch in the linked issue did not resolve this issue for me:
PHP Catchable fatal error: Argument 2 passed to Drupal\\memcache\\MemcacheBackend::valid() must be an instance of stdClass, null given
Ah, I see that my error is slightly different; it says stdClass, not Array.
Comment #7
misc commentedWhich version or commit of the module are you using?
Comment #8
lussolucaI've the same error as @dagomar, I'm using the latest dev of memcache on Drupal 8.1.1.
The patch attached checks for return values of getMulti to see if it's non NULL and it works for me.
Comment #9
lussolucaComment #10
jcnventuraThis is a duplicate of #2674884: Array exception and notices, and I actually like the way the patch is built on the other one. (testing for is_object($result) instead of simply $result).. The check in #9 succeeds if $result = 1 or TRUE or simply not empty.