Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Deprecated function: MongoBinData::__construct(): The default value for type will change to 0 in the future. Please pass in '2' explicitly. in DrupalMongoDBCache->set() (line 131 of ......../sites/all/modules/mongodb/mongodb_cache/mongodb_cache.inc).
I believe this doesnt seem to be much of an issue, but it does affect the performance a little as it keeps on flooding the watchdog with every request.
Comment | File | Size | Author |
---|---|---|---|
#13 | mongodb-1786330-13-version_compare.patch | 887 bytes | donquixote |
#8 | 1786330-bindata_generic.patch | 2.35 KB | fgm |
#1 | 0001-Issue-1786330-MongoBinData-__construct-needed-an-exp.patch | 975 bytes | fgm |
Comments
Comment #1
fgmNote: this warning is new in version 1.2.11 of the extension.
Going further, I wonder whether there would not be more to gain from alway using a
MongoBinData::BYTE_ARRAY
instead of routing each string data throughdrupal_validate_utf8()
as the check currently does.This probably needs performance testing, but that would be a followup issue.
Comment #3
regilero CreditAttribution: regilero commented+1 flooding the watchdog on each cache operation is bad.
Comment #4
jonloh CreditAttribution: jonloh commentedApplied patch from #1 and it seems to be not flooding the logs anymore. Should consider this to be comitted :)
Thanks fgm!
Comment #5
mgifford#1: 0001-Issue-1786330-MongoBinData-__construct-needed-an-exp.patch queued for re-testing.
Comment #7
pipep CreditAttribution: pipep commentedHow can I make it go away ?? I uninstalled the mongodb_cache submodule, and no results.
Deprecated function: MongoBinData::__construct(): The default value for type will change to 0 in the future. Please pass in '2' explicitly. in DrupalMongoDBCache->set() (line 131 of /D723/sites/all/modules/mongodb/mongodb_cache/mongodb_cache.inc).
If I remove from settings.php
I get white screen with the following error:
2013/09/15 20:39:25 [error] 2242#0: *2661 FastCGI sent in stderr: "PHP message: PHP Catchable fatal error: Argument 2 passed to SelectQuery::fields() must be of the type array, null given, called in /D723/includes/entity.inc on line 279 and defined in /D723/includes/database/select.inc on line 1300" while reading response header from upstream, client: 00.000.000.00, server: domain.com, request: "GET /admin/reports/status/run-cron HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "domain.com", referrer: "http://domain.com/"
Any help appreciated.
Thanks for the module.
Update: doesn't matter, started a new instance as the sub module full filled my setup with errors. Im using nginx, varnish, memcache, Maria DB and Mongo DB. Skipping from the beginning mongodb cache and mongodb block solved my problems. cheers.
Comment #7.0
pipep CreditAttribution: pipep commentedAdded
formatting.
Comment #8
fgmThings changed since then : the default is now MongoBinData::GENERIC instead of BYTE_ARRAY. Rerolled on top of #2547411: Match core flushing logic and ensure expiration always happens to be able to use the cache tests (passing).
Comment #10
fgmCommitted to 7.x-1.x.
Comment #12
donquixote CreditAttribution: donquixote as a volunteer commentedI still get this showing up in my logs.
My PhpInfo shows MongoDB version 1.4.5.
But the code still uses the first version of getBinDataCreator(),
Why?
Because version_compare($x, $y) wants both $x and $y to be correct version strings.
It does not look up the version of an extension.
This is what we want:
http://stackoverflow.com/a/14626296/246724
Comment #13
donquixote CreditAttribution: donquixote as a volunteer commentedInteresting, I cannot test this against 7.x-1.x, only 8.x-1.x.
No tests existing?
Comment #15
fgmThanks for the patch, committed to todays 7.x-1.x HEAD.
Regarding tests, they can not run on d.o. QA as such, because they need a MongoDB instance and the classic qa.d.o. does not have this, but you can run them locally if you have a MongoDB instance on localhost:27017.
The new container-based QA infra should allow instantiating MongoDB for tests, but I still haven't found time to check how to do this. Help welcome.