I get Fatal error: Call to undefined function t() in /............../sites/all/modules/memcache/dmemcache.inc on line 236

On that line, dmemcache.inc tries to put out a warning message, but it fails, presumably not knowing t() at that stage?

Comments

cardioid1’s picture

I get the same error while trying to run an external script to node_save data.

EDIT: memcached PECL module wasn't enabled...

otsuarez’s picture

i had the same error, i'd installed php pecl memcache, installed and started memcached daemon, but forgot to restart apache. Doing that solved the issue and remove the error.

Daniel Norton’s picture

Issue tags: +translation, +error reporting, +boot
StatusFileSize
new637 bytes

This patch first checks to see if t() is defined and skips the translation step if it's not. (Perhaps it never is at this stage?)

Daniel Norton’s picture

Status: Active » Needs review

Submit patch to bot

killes@www.drop.org’s picture

Status: Needs review » Reviewed & tested by the community

I got this too, the patch helps.

mrfelton’s picture

I think this should be committed - without it, you get a whitescreen of death if the PECL extension is not installed.

cyberwolf’s picture

Subscribing.

robertdouglass’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new803 bytes

In my testing t() just doesn't exist at this point in execution. I'm therefore removing it altogether. If anyone has suggestions about how it can be made localizable, let me know. Attached patch is being committed.

robertdouglass’s picture

#852794 by Daniel Norton, robertDouglass | cardioid1: Fixed Call to undefined function t() in ....../dmemcache.inc on line 236.

jeremy’s picture

Perhaps we should be adding a comment here in the code noting why we're not translating, so later on we don't come along and add the t() back...

robertdouglass’s picture

Assigned: Unassigned » robertdouglass
Status: Fixed » Needs work

@jeremy - good idea. I'll do that, and then port to D7 as well.

Daniel Norton’s picture

robertdouglass’s picture

A possibly better solution? #921506: Missing include

robertdouglass’s picture

StatusFileSize
new765 bytes

Here's the docs I added.

robertdouglass’s picture

Version: 6.x-1.5 » 7.x-1.x-dev
Status: Needs work » Patch (to be ported)

It's now a question whether this applies to D7.

robertdouglass’s picture

Assigned: robertdouglass » Unassigned
_-.’s picture

non-issue; ignore

catch’s picture

Status: Patch (to be ported) » Fixed

t()'s now defined in bootstrap.inc so this shouldn't be a problem.

Status: Fixed » Closed (fixed)
Issue tags: -translation, -error reporting, -boot

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