Closed (duplicate)
Project:
Shared Sign-On
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2007 at 08:22 UTC
Updated:
24 Sep 2011 at 09:55 UTC
When I have normal caching enabled, the following error is presented to anonymous users:
Fatal error: Call to undefined function: t() in /home/mantraso/public_html/sites/all/modules/singlesignon/singlesignon.module on line 126
Authenticated users do not receive this error. With caching disabled, the site works fine for anonymous users again.
I did a search and returned this result (if it's helpful at all - this is for the advuser module) - http://drupal.org/node/76073
Comments
Comment #1
allen commentedI can not use caching with ethier of the following:
singlesignon.module, persistent_login.module or multidomain.module
Error:
Notice: Undefined index: persistent_login_check in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\allensworld\modules\addmodules\persistent_login\persistent_login.module on line 260
Notice: Undefined index: HTTPS in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\allensworld\modules\addmodules\multidomain\multidomain.module on line 277
Notice: Undefined index: http://www.allensworld.org in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\allensworld\modules\addmodules\multidomain\multidomain.module on line 278
Notice: Undefined index: HTTPS in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\allensworld\modules\addmodules\multidomain\multidomain.module on line 301
Fatal error: Call to undefined function t() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\allensworld\modules\addmodules\singlesignon\singlesignon.module on line 119
Notice: Undefined property: stdClass::$cache in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\allensworld\includes\session.inc on line 77
Can some one please help me
Comment #2
danielc commentedhttp://drupal.org/node/118458 marked duplicate of this.
Comment #3
danielc commentedComment #4
particle commentedThis bug is severe enough to take down multiple sites at once and it is easily reproduced.
Comment #5
jonmiles commentedThe file in question is singlesignon.modules, and should be wherever you put your modules.
Go to the line mentioned in the error, mine was line 127, and remove the stray "t".
line looked like:
if ($op == t('Log in')) {should be:
if ($op == ('Log in')) {At least, this is what I gather, as this fixed the problem.
Comment #6
yngens commentedjonmiles, thank you.
shouldn't it be like
if we take 't' out then we should also get rid of its parentheses.
Comment #7
frjo commentedThis is a translatable string so for it to work on non english sites it needs the t(). I provided the patch for this myself, see http://drupal.org/node/102447.
I later found that this made the module not work with cache turned on. Another developer then found that including common.inc in singlesignon_init() somewhere above "t('Log in')" solves the problem.
We run this on a installation with 25000+ users to get singel sign-on between two sites and it works well.
Comment #8
wayland76 commentedDuplicate of http://drupal.org/node/144182
Comment #9
beijinger commentedwrong post. sorry.