Closed (won't fix)
Project:
Gigya - Social Infrastructure
Version:
6.x-2.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2010 at 22:30 UTC
Updated:
22 Aug 2012 at 13:09 UTC
Today I received "Fatal error: Call to a member function Logout() on a non-object in /home/techmi5/public_html/urbanministryjobs/sites/all/modules/gigya/gigya.module on line 457" when trying to log in to my test Socialize site. I don't have much data on this bug yet, other than that I was trying to log in with Twitter.
Here was the URL: "http://www.urbanministryjobs.org/socialize-login?destination=&signature=..."
I'll try to update with more data, and change priority higher or lower based on what I find out.
Comments
Comment #1
EvanDonovan commentedFor more info:
line 457 in my gigya.module is simply $user->gigya->Logout();
It looks like gigya_user is getting called with an $op of "logout", when I am trying to log in. Maybe I broke the code?
I will try clearing cookies, etc.
Comment #2
EvanDonovan commentedTurns out this was due to the login hook of the Legal module calling module_invoke_all('user', 'logout'...) when the terms & conditions for the site had been updated. Thus, the logout hook was being called when there was as yet no Gigya object.
This may be better off being handled by the Legal module, since it is such an odd case.
Comment #3
EvanDonovan commentedCross-reference: #753442: Simply changing the display settings should not create a new version of terms.
Comment #4
azinck commentedIn general I've been wondering about how fragile it is to rely on the gigya object being attached to the user. I chose that architecture but it might not be for the best. I'm not familiar enough with the inner workings of some of the more complex modules to know if that's a bad idea. The practice also seems to cause a problem with the new webform module (v3) that apparently inspects the user object for some reason. Hmm...thoughts anyone?
Comment #5
EvanDonovan commentedI didn't realize that the gigya object didn't used to be attached to the user. I'm going to poll IRC on this, see if folks more experienced in the Drupal way can weigh in.
If we are going to change architectures, then we should cross-reference related issues here.
Also, I will try to remember to post an issue to Legal module in regard to the (lack) of use of user_module_invoke & the missing of the "load" op prior to the "logout" op.
Comment #6
EvanDonovan commentedThis same error happened on my site (where Gigya is now live, btw) in a different circumstance. I wonder if there is some kind of error checking we should do to see if $user->gigya exists before doing operations to it in the "logout" op.
Comment #7
EvanDonovan commentedI do think we should have the gigya object attached to the $user object, though, probably. We should see if we can get feedback from some more experienced Drupal developers on this.
Comment #8
EvanDonovan commentedProbably this could be fixed simply by checking
isset($user->gigya)before proceeding to unset it.Comment #9
EvanDonovan commentedIn the hook_user implementation (gigya_user), I changed the "logout" $op to the following:
if(isset($user->gigya)) { $user->gigya->Logout(); }I'll report back and post a patch if that resolves the issue.
Comment #10
gambaweb commentedI think it is a good idea warping the logout with isset
Comment #11
EvanDonovan commentedI reported this issue on a legacy version of the module, so I doubt that it is going to be relevant anymore.