Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I get the following error when i logout, if the sms module is enabled.
Error message
Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in user_logout() (line 175 of C:\xampp_apc\kw3\modules\user\user.pages.inc).
Comment | File | Size | Author |
---|---|---|---|
#9 | smsframework.sms_user-switch.1619024-09.patch | 5.39 KB | ekes |
#5 | smsframework-sms_user-1619024-5.patch | 597 bytes | mcpuddin |
#1 | sms-session_destroyed_error-1619024-#1.patch | 511 bytes | mhaamann |
Comments
Comment #1
mhaamann CreditAttribution: mhaamann commentedI have attached a patch that seems to fix the problem when the user logs out. Can anyone verify that this fix is correct?
Comment #2
crazyrohila CreditAttribution: crazyrohila commentedseems like url is broken or this file doesn't exist.
Comment #3
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedwould like to test this patch
Comment #4
cashwilliams CreditAttribution: cashwilliams commentedI'm seeing the issue too. Please repost the patch so we can test it!
Comment #5
mcpuddin CreditAttribution: mcpuddin commentedso the path of the patch was corrupted (the # sign should %23 .. so this should work to see it http://drupal.org/files/sms-session_destroyed_error-1619024-%231.patch )
I looked into the patch and basically the problem is sms_user interferes with sms_user_logout, which actually is invoking hook_user_logout in D7. I remade the patch and changed the name of the function because it was not supposed to invoke hook_user_logout at all.
Comment #6
mcpuddin CreditAttribution: mcpuddin commentedCommitted
Comment #8
Imaaxa-Cory CreditAttribution: Imaaxa-Cory commentedI am getting this error, just a bit different.
Warning: session_destroy() [/phpmanual/function.session-destroy.html]: Trying to destroy uninitialized session in sms_user_sms_logout() (line 894 of mysite.com/sites/all/modules/contrib/smsframework/modules/sms_user/sms_user.module).
I checked and the smsframework-sms_user-1619024-5.patch is part of the file. I trying to backtrack what is calling this function and was unable to go back any further than function sms_user_sms_incoming($op, $number, $message, $options).
I am using Drupal core 7.16 also have the Twilio SMS integration 7.x-1.x-dev
Comment #9
ekes CreditAttribution: ekes commentedBased on Safely Impersonating Another User I have created one function that switches the user.
It stores the user and session, storing them in a static to be restored after. It then stops session changes, and logs in the SMS user. I have left the call to all the user_login hooks there.
Comment #10
ekes CreditAttribution: ekes commentedPushed at request http://drupalcode.org/project/smsframework.git/commit/48a61f3e53e680a44e...
Comment #12
almaudoh CreditAttribution: almaudoh commented